Two values to find on the same cell [Solved/Closed]

Report
Posts
34
Registration date
Monday March 10, 2014
Status
Member
Last seen
September 21, 2015
-
Posts
34
Registration date
Monday March 10, 2014
Status
Member
Last seen
September 21, 2015
-
Hi,
Can the below be shorten up? It's basically to count if "dr" or "ba" are in cell E2180;

=IF(ISNUMBER(SEARCH("(dr)",E2180)),"1",IF(ISNUMBER(SEARCH("(ba)",E2180)),"1",""))

Thank you for your help

2 replies

Posts
2669
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 15, 2020
446
Hi Jutulu,

So you basically want to know if either "(dr)" or "(ba)" are present in E2180 (you are not counting).

Another way to get that result is to use:
=IF(OR(ISNUMBER(SEARCH("(dr)",E2180)),ISNUMBER(SEARCH("(ba)",E2180))),1,"")

Which is 6 characters shorter (or 4 if you want to put the 1 on the left side of the cell).

To answer your question: YES

Best regards,
Trowa
Posts
34
Registration date
Monday March 10, 2014
Status
Member
Last seen
September 21, 2015
1
Thanks. It works great