Can someone tell me why this formula always returns no unless I put the WHOLE search string?

spyrule

Board Regular
Joined
Aug 21, 2015
Messages
114
This is the formula I'm attempting to use (which, I have used in the past and no issues):

Code:
=IF(ISNUMBER(SEARCH("Sport Slotted - GM - 126.62092SL","Slotted")), "Yes", "No")

This Always returns NO unless I put the whole search string as "Sport Slotted - GM - 126.62092SL", which defeats the whole point of this search.
 
Last edited:

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
You have the parameters reversed. Try:

=IF(ISNUMBER(SEARCH("Slotted","Sport Slotted - GM - 126.62092SL")), "Yes", "No")
 
Upvote 0
NVM, Solved it.

Had the SEARCH terms backwards. I was thinking SEARCH(TEXT,WHAT TO SEARCH FOR), turns out its the opposite!
 
Upvote 0
Glad you got it sorted. I always try to remember SEARCH("needle", "haystack"). It's a little tricky since different languages do it differently. In fact, InStr in VBA has the parameters the opposite way. Frustrating! :rolleyes:
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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
Back
Top