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 Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
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,224,827
Messages
6,181,197
Members
453,022
Latest member
RobertV1609

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