Imran Azam
Board Regular
- Joined
- Mar 15, 2011
- Messages
- 103
Hi guys
I don't know if the below is enough for people to suggest any improvements, but I wanted to ask if I can write the below in a more efficient way?
its a if statement going through different rules
IF(AND(G2=$G$19,P2=$P$12),$Q$12,IF(AND(O2=$O$13,P2=$P$13),$Q$13,IF(AND(G2=$G$14,O2=$O$14),$Q$14,IF(AND(D2=$D$15,G2=$G$15,O2=$O$15),$Q$15,IF(AND(G2=$G$16,I2=$I$16),$Q$16,IF(AND(I2=$I$17,K2=$K$17),$Q$17,IF(AND(G2=$G$18,O2=$O$18),$Q$18,IF(AND(E2=$E$19,G2=G19,I2=$I$19),$Q$19,IF(AND(D2=$D$20,E2=$E$20,G2=$G$20),$Q$20,IF(AND(D2=D21,E2=$E$21,G2=$G$21),$Q$21,""))))))))))
thank you for any help provided
I don't know if the below is enough for people to suggest any improvements, but I wanted to ask if I can write the below in a more efficient way?
its a if statement going through different rules
IF(AND(G2=$G$19,P2=$P$12),$Q$12,IF(AND(O2=$O$13,P2=$P$13),$Q$13,IF(AND(G2=$G$14,O2=$O$14),$Q$14,IF(AND(D2=$D$15,G2=$G$15,O2=$O$15),$Q$15,IF(AND(G2=$G$16,I2=$I$16),$Q$16,IF(AND(I2=$I$17,K2=$K$17),$Q$17,IF(AND(G2=$G$18,O2=$O$18),$Q$18,IF(AND(E2=$E$19,G2=G19,I2=$I$19),$Q$19,IF(AND(D2=$D$20,E2=$E$20,G2=$G$20),$Q$20,IF(AND(D2=D21,E2=$E$21,G2=$G$21),$Q$21,""))))))))))
thank you for any help provided