Why does this IF(OR(ISNUMBER(SEARCH find one item, but not the other?

blbat

Active Member
Joined
Mar 24, 2010
Messages
292
=IF(OR(ISNUMBER(SEARCH("*UNIT RCVD/OnHand*", $R2,0)), ISNUMBER(SEARCH("TN0*",$R2, $R2)),ISNUMBER(SEARCH("TN1*", $R2, 0))),"UNIT", "relook")

This Formula will find the "TN0*" string within the cell R2, but will NOT find the "TN1*" string.

what am I doing wrong...or am I going at this the wrong way?

(R2 contains a sentence (String) of text, dates and numbers in the one cell.)


regards,

blbat
 

Some videos you may like

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

jimrward

Well-known Member
Joined
Feb 24, 2003
Messages
1,784
Office Version
  1. 2016
  2. 2013
  3. 2011
  4. 2010
  5. 2007
Platform
  1. Windows
For TN0 why have you got R2 twice in the search
 

blbat

Active Member
Joined
Mar 24, 2010
Messages
292
TYPO...sorry

=IF(OR(ISNUMBER(SEARCH("*UNIT RCVD/OnHand*", $R2,0)), ISNUMBER(SEARCH("TN0*",$R2,0)),ISNUMBER(SEARCH("TN1*", $R2, 0))),"UNIT", "relook")
 

Watch MrExcel Video

Forum statistics

Threads
1,122,421
Messages
5,596,033
Members
414,039
Latest member
southike

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top