Forum Discussion
Formula Help in Excel
=IFS(A723="Barb",VLOOKUP(B723,Kelly,11,FALSE),A723="Betty",VLOOKUP(B723,Kelly,11,FALSE),A723="Bridget",VLOOKUP(B723,Kelly,13,FALSE),A723="Brad",VLOOKUP(B723,Kelly,12,FALSE),TRUE,"No Match")
it doesn't seem to be working or i am not doing something correct. Does IFNA's work with all my IFS?
- FikturFoxMar 01, 2023Brass Contributor
Hi. I am not suggesting to wrap your IFS() function with IFNA().
With IFS(), it evaluates every condition that you put. In your example, you have 5 conditions. The 1st one returns False, so it moves to evaluate the 2nd condition, which is again False, then moves to evaluate the next condition (3rd) which is also False. Then comes the 4th condition which evaluates to True, so it then executes VLOOKUP(B723,Kelly,12,FALSE) but returned #N/A. The 5th condition (TRUE, "No Match") is not going to be evaluated because the previous condition (4th) was evaluated to be True. It stops there and moves to execute that vlookup() function which returned #n/a. Should that 4th condition returned False, then you will have an answer of "No Match". Now if you do not want #n/a as a result from the vlookup(), then wrap it with ifna().ie IFNA(VLOOKUP(B723,Kelly,12,FALSE) , ""), this will now return blank or empty.
- balopez66Mar 01, 2023Copper ContributorThank you so much for your knowledge:
Modified formula:
=IFS(A723="Barb",VLOOKUP(B723,Kelly,11,FALSE),A723="Betty",VLOOKUP(B723,Kelly,11,FALSE),A723="Bridget",VLOOKUP(B723,Kelly,13,FALSE),A723="Brad",VLOOKUP(B723,Kelly,12,FALSE),IFNA(VLOOKUP(B723,Kelly,12,False),"")
This gives me "The Formula is missing an opening or closing parenthesis".- FikturFoxMar 01, 2023Brass Contributor
Your formula should be modified like this:
=IFS( A723="Barb", IFNA(VLOOKUP(B723,Kelly,11,FALSE),""), A723="Betty", IFNA(VLOOKUP(B723,Kelly,11,FALSE),""), A723="Bridget", IFNA(VLOOKUP(B723,Kelly,13,FALSE),""), A723="Brad", IFNA(VLOOKUP(B723,Kelly,12,FALSE),""), TRUE,"No Match")