More than 7 if statements what can I do

Vince1199s

New Member
Joined
Mar 4, 2016
Messages
22
I am struggling with a formula, I was hoping to use nested if's however I need more than seven if statements and excel cannot process over 7. What can I do ? I tried (=IF(AND(B:B="Yes",A:A>5),"High Risk") which is fine for a two answer result so I thought what if I nest these ? (=IF(AND(B:B="Yes",A:A>5),"High Risk"),IF(AND(D:D="Yes",A:A>5),"High Risk") that didn't work out so well I got "#VALUE!" so I tried the same with IF(OR and got the same results.

Column A is how many floors in the building and columns B-E is the type of installation and below is the example of how they are split between risks Low to High.

High Risk If A>5 and B=Yes, If A>5 and D=Yes

Medium Risk If A<6 and B=Yes, If A<6 and D=Yes, If A>5 and C=Yes, IF A>5 and B=No, C=No, D=No, E=No

Low Risk If A <6 and C=Yes, If E=Yes, IF A<6 and B=No, C=No, D=No, E=No below is the sheet with the formulas I have already tried and their results, I have 7000 in total to risk score.


MOB Trial.xlsx
ABCDEFGHIJK
1Number of FloorsInternal RiserExternal RiserInternal ManifoldExternal ManifoldTrial Formula 1Trial Formula 2Trial Formula 3Trial Formula 4Trial Formula 5Trial Formula 6
24NoNoNoNoFALSE#VALUE!FALSEFALSE#VALUE!FALSE
33NoYesNoNoFALSE#VALUE!Low RiskFALSE#VALUE!Low Risk
46YesNoNoNoHigh Risk#VALUE!High RiskHigh Risk#VALUE!High Risk
53NoNoNoNoFALSE#VALUE!FALSEFALSE#VALUE!FALSE
63NoNoNoNoFALSE#VALUE!FALSEFALSE#VALUE!FALSE
73NoNoNoNoFALSE#VALUE!FALSEFALSE#VALUE!FALSE
83NoNoNoNoFALSE#VALUE!FALSEFALSE#VALUE!FALSE
94NoNoNoNoFALSE#VALUE!FALSEFALSE#VALUE!FALSE
105NoNoNoNoFALSE#VALUE!FALSEFALSE#VALUE!FALSE
114NoNoNoNoFALSE#VALUE!FALSEFALSE#VALUE!FALSE
Sheet1
Cell Formulas
RangeFormula
F2:F11F2=IF(AND(B:B="Yes",A:A>5),"High Risk")
G2:G11G2=IF(AND(B:B="Yes",A:A>5),"High Risk"),IF(AND(D:D="Yes",A:A>5),"High Risk")
H2:H11H2=IF(AND(B:B="Yes",A:A>5),"High Risk",IF(AND(D:D="Yes",A:A>5),"High Risk",IF(AND(D:D="Yes",A:A<6),"Medium Risk",IF(AND(B:B="Yes",A:A<6),"Medium Risk",IF(AND(C:C="Yes",A:A>5),"Medium Risk",IF(AND(C:C="Yes",A:A<6),"Low Risk",IF(AND(D:D="Yes",A:A<6),"Medium Risk")))))))
I2:I11I2=IF(OR(B:B="Yes",D:D="Yes",A:A>5),"High Risk")
J2:J11J2=IF(OR(B:B="Yes",D:D="Yes",A:A>5),"High Risk"),IF(OR(B:B="Yes",D:D="Yes",A:A<6),"Medium Risk")
K2:K11K2=IF(AND(A:A>5,B:B="yes"),"High Risk",IF(AND(A:A>5,D:D="yes"),"High Risk",IF(AND(A:A>5,C:C="yes"),"Medium Risk",IF(AND(A:A<6,B:B="yes"),"Medium Risk",IF(AND(A:A<6,D:D="yes"),"Medium Risk",IF(AND(A:A<6,C:C="yes"),"Low Risk",IF(E:E="Yes","Low Risk")))))))
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
If you have Office 365, try =IFS

 
Upvote 0
Presumably if it's not high risk or medium risk it's low risk?
If so you don't specifically need to define the low risk options, this may work

=IF(AND(A2>5,OR(B2="YES",D2="YES")),"High Risk",IF(OR(AND(A2<6,OR(B2="YES",D2="YES")),AND(A2>5,C2="YES"),AND(A2>5,B2="NO",C2="NO",D2="NO",E2="NO")),"Medium Risk","Low Risk"))
 
Upvote 0
Sorry it's taken time to try this out but I have now and it works great, really appreciate your help on this.
 
Upvote 0

Forum statistics

Threads
1,213,563
Messages
6,114,329
Members
448,564
Latest member
ED38

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