IFS Function in Excel

Johnny Hale 20 Reputation points
2025-06-22T16:13:23.8466667+00:00

I want search a column of data and select a words with three logical expressions. It works for the first true expression, but not for the other two. Here is the data and formula:

=IFS(FIND("Washer",G3,1)>0,"Washer,",FIND("Bolt",G3,1)>0,"Bolt,",FIND("Nut",G3,1)>0,"Nut,")

User's image

What is the problem with this formula?

Microsoft 365 and Office Excel For business Windows
0 comments No comments
{count} votes

Accepted answer
  1. Q&A Assist
    2025-06-22T16:13:23.94+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The issue with your formula is that the FIND function returns an error if the specified text is not found, which can cause the IFS function to stop evaluating further conditions. The IFS function evaluates each condition in order and returns the result for the first condition that is true. If the first condition fails (i.e., if "Washer" is not found), it will not evaluate the subsequent conditions for "Bolt" and "Nut".

    To handle this, you can use the ISNUMBER function to check if the FIND function returns a number (indicating that the text was found) before proceeding. Here’s how you can modify your formula:

    =IFS(ISNUMBER(FIND("Washer",G3,1)),"Washer,", ISNUMBER(FIND("Bolt",G3,1)),"Bolt,", ISNUMBER(FIND("Nut",G3,1)),"Nut,")
    

    This way, each condition will only be evaluated if the FIND function does not return an error.


    References:

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.