简体   繁体   中英

Assist with an if is number search excel formula

Added a picture here for reference but the gist is I need help with an if is number search with multiple criteria.

=IF(ISNUMBER(SEARCH("UK",G9)),("UK"),ISNUMBER(SEARCH("Canada",G9)),"CA")

I'm trying to get the cell to say that if the value in G9 is UK then i want it to say UK, if the value in cell G9 is Canada, I want it to say Canada, or if there is neither, than I want it to say US. But i'm getting an N/A error whenever I added the canada piece to it.

You have () in the wrong place and you need to nest an IF

=IF(ISNUMBER(SEARCH("UK",G9)),"UK",IF(ISNUMBER(SEARCH("Canada",G9)),"CA","US"))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM