SOLVED

Excel IFS Function

Copper Contributor

Hey!

I need some help on a task in excel. Ive simulated a card game and cannot find out a way to use the IFS function.

Ive got four values (e.g. 1-2-2-2, 3-7-1-3, 9-9-9-5). I need to use the IFS forumla so that it returns if the 1st values=2nd value=3rd value or 1st values=2nd value=4th value or 1st value=3rd value=4th value or 2nd value=3rd value=4th value.

I use the formula =IFS(A2=B2=C2,"1") but it doesn't work. 

Thanks!

3 Replies
best response confirmed by LachlanM06 (Copper Contributor)
Solution
you need to use AND(), just like you would using nested IF()...

IFS(AND(A2=B2, B2=C2), "1", AND(B2=C2, C2=D2), "2", TRUE, "??NOT FOUND IN LIST")

re the TRUE entry, I always put a "catch-all" at the end of IFS so that anything unexpected doesn't return a # error but gives an indicator to describe the issue
Thank you so much you're literally a life saver!! I also need to do a straight e.g. (1-2-3-4) and don't know how to do that (Im not that good at excel). Any ideas?
Just include the extra entries in the 'AND() separated by commas. Take what is there before as an example and see if you can expand on it.
1 best response

Accepted Solutions
best response confirmed by LachlanM06 (Copper Contributor)
Solution
you need to use AND(), just like you would using nested IF()...

IFS(AND(A2=B2, B2=C2), "1", AND(B2=C2, C2=D2), "2", TRUE, "??NOT FOUND IN LIST")

re the TRUE entry, I always put a "catch-all" at the end of IFS so that anything unexpected doesn't return a # error but gives an indicator to describe the issue

View solution in original post