Make this formula take more than three if statements

Excel43

New Member
Joined
Jan 7, 2020
Messages
14
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
I have a pretty complex formula and I would need it to take more than three if statements. Right now it it says: If first condition is met, "use this if" if true, and "use this if" if false. I need to chain 9 different ifs. So basically I need it to say "If first condition is met (this is one if) AND This or This or This (8 if statements. If first is not correct, then check next, then next and so on).

Is this possible to do? Here is my formula:

VBA Code:
=INDEX(Vikta;SMALL(IF(Vikta[Grupp]=I3;IF(Vikta[Grupper]=1;ROW(Vikta)-4);IF(Vikta[Grupper]=2;ROW(Vikta)-4));ROW($1:$1));27)
 

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
As you are working with Office 365 you should be able to use IFS function - this should help you with checking multiple conditions.

IFS function
 
Upvote 0
Thanks, you where right. I solved it with IFS. Final solution:

VBA Code:
=IFERROR(INDEX(Vikta;SMALL(IF(Vikta[Grupp]=I3;IFS(Vikta[Grupper]=1;ROW(Vikta)-4;Vikta[Grupper]=2;ROW(Vikta)-4;Vikta[Grupper]=3;ROW(Vikta)-4;Vikta[Grupper]=4;ROW(Vikta)-4;Vikta[Grupper]=5;ROW(Vikta)-4;Vikta[Grupper]=6;ROW(Vikta)-4;Vikta[Grupper]=7;ROW(Vikta)-4;Vikta[Grupper]=8;ROW(Vikta)-4));ROW($1:$1));27);"")
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,198
Members
452,617
Latest member
Narendra Babu D

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