Using IF, ISNUMBER Search function to give text names possible?

crayroge

New Member
Joined
Mar 17, 2020
Messages
9
Office Version
  1. 2016
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
Hello,

I am trying to use this function below to give text names if these sentences contain certain values like class name update, term benefits, OR dates. I want the function to give these values instead of 'TRUE' or 'FALSE'. I can't for some reason see what I am doing wrong.....

=IF(ISNUMBER(SEARCH("Class Name",A3)),"Class Change")=IF(ISNUMBER(SEARCH("OR dates",A3)),"Override")=IF(ISNUMBER(SEARCH("Term all Benefits",A3)),"Benefit Term", "NA")
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi & welcome to MrExcel.
How about
=IF(ISNUMBER(SEARCH("Class Name",A3)),"Class Change",IF(ISNUMBER(SEARCH("OR dates",A3)),"Override",IF(ISNUMBER(SEARCH("Term all Benefits",A3)),"Benefit Term", "NA")))
 
Upvote 0
Hi, welcome to the forum.

Your nested IF() formula should be more like this:
=IF(ISNUMBER(SEARCH("Class Name",A3)),"Class Change",IF(ISNUMBER(SEARCH("OR dates",A3)),"Override",IF(ISNUMBER(SEARCH("Term all Benefits",A3)),"Benefit Term", "NA")))

Or here is an alternative that you may find this easier to extend if needed.

=IFNA(LOOKUP(2,1/SEARCH({"class name","or dates","term all benefits"},A3),{"Class Change","Overide","Benefit Term"}),"NA")
 
Upvote 0
Ok thanks all! However, its giving me the values but I wanted it to be distinct....which might be difficult. Any suggestions? Reason being one of the sentences may contain class name and OR dates...is that too complicated for Excel?
 
Upvote 0
How about
=IF(ISNUMBER(SEARCH("Class Name",A3)),"Class Change ","")&IF(ISNUMBER(SEARCH("OR dates",A3)),"Override ","")&IF(ISNUMBER(SEARCH("Term all Benefits",A3)),"Benefit Term ", "")
 
Upvote 0
Thanks Fluff! this worked fine and exactly what I needed
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,213,501
Messages
6,114,010
Members
448,543
Latest member
MartinLarkin

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