Stringing If Statements together!

Metalboy

New Member
Joined
Jun 25, 2020
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hi, Can anyone help me with stringing the following IF statements together into one long IF statement: This is the order I'd like them, obviously the =IF will disappear from the 2nd two statements. I can get them to work in isolation but not as one. Keep getting missing parenthesise message. Basically I'd like, IF J2 doesn't equal "Ip" then execute statement A otherwise execute statement B

=IF(J2<>"Ip",

A
=IF(J4<199,$C$14,IF(AND(J4>=200,J4<=299),$D$14,IF(AND(J4>=300,J4<=399),$E$14,IF(AND(J4>=400,J4<=499),$F$14,IF(AND(J4>=500,J4<=599),$G$14,IF(AND(J4>=600,J4<=699),$H$14,IF(AND(J4>=700,J4<=799),$I$14,IF(AND(J4>=800,J4<=899),$J$14,IF(AND(J4>=900,J4<=999),$K$14,IF(AND(J4>=1000,J4<=1099),$L$14,IF(AND(J4>=1100,J4<=1199),$M$14,IF(AND(J4>=1200,J4<=1299),$N$14))))))))))))

B
=IF(AND(J4>=150,J4<=390),$R$16,IF(AND(J4>390,J4<570),$S$16,IF(AND(J4>=570,J4<660),$T$16,IF(AND(J4>=660,J4<750),$U$16,IF(AND(J4>=750,J4<840),$V$16,IF(AND(J4>=840,J4<1110),$W$16,IF(J4>=1110,$X$16)))))))
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
=IF(J2<>"Ip",IF(J4<199,$C$14,IF(AND(J4>=200,J4<=299),$D$14,IF(AND(J4>=300,J4<=399),$E$14,IF(AND(J4>=400,J4<=499),$F$14,IF(AND(J4>=500,J4<=599),$G$14,IF(AND(J4>=600,J4<=699),$H$14,IF(AND(J4>=700,J4<=799),$I$14,IF(AND(J4>=800,J4<=899),$J$14,IF(AND(J4>=900,J4<=999),$K$14,IF(AND(J4>=1000,J4<=1099),$L$14,IF(AND(J4>=1100,J4<=1199),$M$14,IF(AND(J4>=1200,J4<=1299),$N$14)))))))))))),IF(AND(J4>=150,J4<=390),$R$16,IF(AND(J4>390,J4<570),$S$16,IF(AND(J4>=570,J4<660),$T$16,IF(AND(J4>=660,J4<750),$U$16,IF(AND(J4>=750,J4<840),$V$16,IF(AND(J4>=840,J4<1110),$W$16,IF(J4>=1110,$X$16))))))))

Untested
 
Upvote 0
=IF(J2<>"Ip",IF(J4<199,$C$14,IF(AND(J4>=200,J4<=299),$D$14,IF(AND(J4>=300,J4<=399),$E$14,IF(AND(J4>=400,J4<=499),$F$14,IF(AND(J4>=500,J4<=599),$G$14,IF(AND(J4>=600,J4<=699),$H$14,IF(AND(J4>=700,J4<=799),$I$14,IF(AND(J4>=800,J4<=899),$J$14,IF(AND(J4>=900,J4<=999),$K$14,IF(AND(J4>=1000,J4<=1099),$L$14,IF(AND(J4>=1100,J4<=1199),$M$14,IF(AND(J4>=1200,J4<=1299),$N$14)))))))))))),IF(AND(J4>=150,J4<=390),$R$16,IF(AND(J4>390,J4<570),$S$16,IF(AND(J4>=570,J4<660),$T$16,IF(AND(J4>=660,J4<750),$U$16,IF(AND(J4>=750,J4<840),$V$16,IF(AND(J4>=840,J4<1110),$W$16,IF(J4>=1110,$X$16))))))))

Untested

Life Save! Thank you so much, your solution works perfectly. Very much appreciated.
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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