Nested If Statement

Stroobs

New Member
Joined
Feb 22, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have the following nested if statement.

= IF(NSCs[@[SLP?]]="X",
IF(NSCs[@[SLP 1]]="X","Plan 1",
IF(NSCs[@[SLP 2]]="X","Plan 2",
IF(NSCs[@[SLP 3]]="X","Plan 4","not known"))))

which works fine.

However I need to do a check before the above to check for a blank in the SLP? field along the lines of the below.

= IF(ISBLANK(NSCs[@[SLP?]]),""," "),

So the order I need is:

If SLP? field is blank, leave the current cell blank.
Else if SLP? is not blank and SLP 1 has an X, put "Plan 1" in current cell.
Else if SLP? is not blank and SLP 2 has an X, put "Plan 2" in current cell.
Else if SLP? is not blank and SLP 3 has an X, put "Plan 4" in current cell.
Else put "not known" in the current cell.

I'm struggling of how to get the checks to work in the order I need so any help would be appreciated.

Thanks.
 

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
How about
Excel Formula:
=IF(NSCs[@[SLP?]]="","",IF(NSCs[@SLP1]="X","Plan 1",IF(NSCs[@SLP2]="X","Plan 2",IF(NSCs[@SLP3]="X","Plan 4","not known"))))
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,618
Members
449,238
Latest member
wcbyers

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