Nested IF, IFS or OR's

Smeggy

Board Regular
Joined
Mar 7, 2013
Messages
151
Hi All,
I'm trying to resolve a nested IF in excel, or IFS. Which ever is easiest. I'm trying to get the following idea to work:
IFS(Sheet1B8=Sheet2A3,C23,Sheet1B8=Sheet2A4,C23,Sheet1B8=Sheet2A5,C23,Sheet1B8=Sheet2A6,C22,Sheet1B8=Sheet2A7,C22,Sheet1B8=Sheet2A8,C22,Sheet1B8=Sheet2A9,C22,Sheet1B8=Sheet2A9,C22,Sheet1B8=Sheet2A10,C22)
However this fails every time.

In Sheet1B8 i have a drop down list
In Sheet2A3 etc is a list of text (names)
In C23 is some text
The following works =IF('Order Sheet'!B8='Information Sheet'!A3,C23) but when i add IFS or IF(or) it fails

The following is an exampl of it failing
=IFS('Order Sheet'!B8='Information Sheet'!A3,C23,'Order Sheet'!B8='Information Sheet'!A4,C23,"No Value")
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I never used IFS before but this is the idea...

Code:
=IF(test,result,IF(test2,result2,IF(test3,result3,fail)))

Change...

Code:
IFS(Sheet1B8=Sheet2A3,C23,Sheet1B8=Sheet2A4,C23,Sheet1B8=Sheet2A5,C23,Sheet1B8=Sheet2A6,C22,Sheet1B8=Sheet2A7,C22,Sheet1 B8=Sheet2A8,C22,Sheet1B8=Sheet2A9,C22,Sheet1B8=Sheet2A9,C22,Sheet1B8=Sheet2A10,C22)

to...


Code:
IF(Sheet1!B8=Sheet2!A3,C23,IF(Sheet1!B8=Sheet2!A4,C23,IF(Sheet1!B8=Sheet2!A5,C23,IF(Sheet1!B8=Sheet2!A6,C22,IF(Sheet1!B8=Sheet2!A7,C22,IF(Sheet1!B8=Sheet2!A8,C22,IF(Sheet1!B8=Sheet2!A9,C22,IF(Sheet1!B8=Sheet2!A9,C22,IF(Sheet1!B8=Sheet2!A10,C22)))))))))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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