How do I configure this formula?

D

dkenebre

How do I create the following formula:
1. If C1, D1 and E1 equal 3 numbers in Q1, then T1=H, U1=H, V1=H,
2. If C1, D1 and E1 equal 2 numbers in Q1 and equal 1 number in R1,
then T1=H, U1=H and V1=T,
3. If C1, D1 and E1 equal 2 numbers in Q1 and equal 1 number in S1,
then T1=H, U1=H, and V1=C,
4. If C1, D1 and E1 equal 1 number in Q1 and equal 2 numbers in R1,
then T1=H, U1=T, and V1=T,
5. If C1, D1 and E1 equal 1 number in Q1 and 1 in R1 and 1 in S1, then
T1=H, U1=T, V1=C,
6. If C1, D1 and E1 equal 1 number in Q1 and 2 in S1, then T1=H, U1=C,
V1=C,
7. If C1, D1 and E1 equal 3 numbers in R1, then T1= T, U1=T, V1=T,
8. If C1, D1 and E1 equal 2 numbers in R1 and 1 in S1, then T1= T,
U1=T, V1=C,
9. If C1, D1 and E1 equal 1 number in R1 and 2 in S1, then T1=T, U1=C,
V1=C,
10. If C1, D1 and E1 equal 3 numbers in S1, then T1=C, U1=C, V1=C

There are 10 possible conditions within this formula.
The values in C, D and E are always a single digit number between 0 and
9 in each cell.
The values in Q, R and S are always 2 to 5 multiple digits in each cell
between 0 and 9.
The key is for T1, U1 and V1 to match the single digits in C, D and E
with the digits in column’s Q, R and S, then match that condition with
correct text
Example:
C1=5, D1=2, E1=8
Q1= 0, 8, 4, R1= 5, 7, 1, 9 S1= 6, 3, 2
This example meet condition #5 above (HTC)
Therefore,
answer: T1=H, U1=T and V1=C

I tried to use the following formula, but only works if there is a
single value in the Q1, S1 or R1 cell and I usually have 2 to 5
separate digits between 0 and 9 in each of these cells.
=IF(C8=Q7,"H",IF(C8=R7,"T",IF(C8=S7,"C")))
Then I tried this formula but it doesn’t either, although, I think it’s
close.
=CHOOSE(IF(ISNUMBER(SEARCH(C8,$Q$7)),"H"),IF(ISNUMBER(SEARCH(C8,$R$7)),"T"),IF(ISNUMBER(SEARCH(C8,$S$7)),"C"))

Thanks
 
D

dkenebre

Another way to explain my request:

I would like to create a formula that would allow a cell to record the
following result, whenever the number in c8 matches any of the numbers
in Q7, put a H in the cell I want, whenever the number in c8 matches
any of the numbers in R7, place a T in the cell I want, whenever the
number in c8 matches any of the numbers in S7, place a C in in the cell
I want. The number range in these cell are 0 through 9. The value in
C8 treated as a single number, while the number in cell q7 is treated
separate values.
for example
c8=9
q7=4,5,9
w7=H
 
T

Tom Ogilvy

=IF(ISNUMBER(FIND(C8,Q7)),"H",IF(ISNUMBER(FIND(C8,R7)),"T",IF(ISNUMBER(FIND(
C8,S7)),"C","-")))

placed in W7
 
D

dkenebre

Tom Thanks, the formula works fine.
How do I get it update the following rows if:
I want to modify and apply this formula on every other row, 6x.
for example:

C1=5, D1=2, E1=8,
then the next entry
c3=2, D3=0, E3=9

because, when I copy special format this formula I have to go into the
formula and change the c, d and e cell. so the c, d and e need to
update by 2 rows 6x while Q1, R1 and S1 stay the same
How do I get it to update formula automatically:
ex formula comparison
C2,D2,E2 - Q1, R1, S1
C4,D4,E4 - Q1, R1, S1
C6,D6,E6 - Q1, R1, S1
C8,D8,E8 - Q1, R1, S1
C8,D8,E8 - Q1, R1, S1
C10,D10,E10 - Q1, R1, S1
C12,D12,E12 - Q1, R1, S1
The above group ends
next group starts
C16,D16,E16 - Q15, R15, S15
C18,D18,E18 - Q15, R15, S15
......and so on........
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top