Ryahn
Ryahn

Reputation: 557

Return FALSE for #N/A in if match statement

I am trying to show a value of FALSE if a match error comes up. Right now, I have not been able to figure it out. I am still pretty new to how formulas work in google spreadsheet.

=IF(MATCH(A16,W46:W52,0),TRUE,FALSE)

Currently works if the value is present

I have tried

=IF(ISNA(MATCH(A16,W46:W52,0)),FALSE,MATCH(A16,W46:W52,0),TRUE,FALSE)

Currently the above does not work and throws up an error for the if statement having too many arguements.

Upvotes: 5

Views: 8556

Answers (1)

JPV
JPV

Reputation: 27262

Try

=ISNUMBER(MATCH(A16,W46:W52,0))

If there is a match the MATCH function will return the relative position of that match (number). If there is no match #N/A will be returned. ISNUMBER returns a boolean value (true or false). So if there is a match it will return TRUE if not it will return FALSE (because in that case there will be no number returned by the MATCH function).

Upvotes: 5

Related Questions