Return FALSE for #N/A in if match statement

 ̄綄美尐妖づ 提交于 2021-01-27 14:31:26

问题


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.


回答1:


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).



来源:https://stackoverflow.com/questions/38726560/return-false-for-n-a-in-if-match-statement

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!