Forum Discussion
Help with this "IFS" statement in office 365
Hello Luigi,
Replying specifically to your BUTTER/CHEESE/MILK formula, the IFS formula should look like this:
=IFS(AND(A1="BUTTER",B1=2),55,AND(A1="CHEESE",B1=3),65,AND(A1="MILK",B1=1),35)
And looks like this in Excel Online:
The formula has been copied down the rows in column C as an example of the result for each combination of values.
The #N/A error occurs as there is no match for the "something is true" of MILK AND 5.
A simple way to avoid this error is to add ' TRUE,"" ' to the end of the formula, like so:
=IFS(AND(A1="BUTTER",B1=2),55,AND(A1="CHEESE",B1=3),65,AND(A1="MILK",B1=1),35,TRUE,"No match")
If each preceeding condition results in FALSE, the final 'condition' is always TRUE and you can display whatever value/text is appropriate.
Hope that helps.