can i write this statement in any better way?

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
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top