oh thanks in advance, but if I want to change O33 to OH or OJ and the P33 value also changes, what formula can I add?try
=index(P35:P40, match(N33&O33,N35:N40&O35:O40,0))
Book2 | |||||||||
---|---|---|---|---|---|---|---|---|---|
M | N | O | P | Q | R | S | |||
32 | |||||||||
33 | Pen | OJ | 104 | ||||||
34 | |||||||||
35 | dd | OH | 7 | OJ | 100 | ||||
36 | A | OH | 1 | OJ | 101 | ||||
37 | B | OH | 2 | OJ | 102 | ||||
38 | c | OH | 3 | OJ | 103 | ||||
39 | PEN | OH | 4 | OJ | 104 | ||||
40 | d | OH | 5 | OJ | 105 | ||||
Sheet2 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
P33 | P33 | =INDEX(IF(O33="OH",P35:P40,R35:R40), MATCH(N33&O33,N35:N40&IF(O33="OH",O35:O40,Q35:Q40),0)) |
Thankyou So Much Etaf, it works=index(P35:P40, match(N33&O33,N35:N40&O35:O40,0))
you could use an IF
assuming if its NOT OH then it is OJ
otherwise a nested IF
=INDEX(IF(O33="OH",P35:P40,R35:R40), MATCH(N33&O33,N35:N40&IF(O33="OH",O35:O40,Q35:Q40),0))
Book2
M N O P Q R S 32 33 Pen OJ 104 34 35 dd OH 7 OJ 100 36 A OH 1 OJ 101 37 B OH 2 OJ 102 38 c OH 3 OJ 103 39 PEN OH 4 OJ 104 40 d OH 5 OJ 105 Sheet2
Cell Formulas Range Formula P33 P33 =INDEX(IF(O33="OH",P35:P40,R35:R40), MATCH(N33&O33,N35:N40&IF(O33="OH",O35:O40,Q35:Q40),0))