Two values to find on the same cell

Solved/Closed
jutulu Posts 34 Registration date Monday March 10, 2014 Status Member Last seen September 21, 2015 - Apr 1, 2014 at 01:51 PM
jutulu Posts 34 Registration date Monday March 10, 2014 Status Member Last seen September 21, 2015 - Apr 7, 2014 at 04:06 PM
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 responses

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Apr 7, 2014 at 12:01 PM
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
0
jutulu Posts 34 Registration date Monday March 10, 2014 Status Member Last seen September 21, 2015 2
Apr 7, 2014 at 04:06 PM
Thanks. It works great
0