Multiple If/Isnumber/search formula

Chewyhairball

Active Member
Joined
Nov 30, 2017
Messages
312
Office Version
  1. 365
Platform
  1. Windows
Hi

I have the following formula in cell S7 which if the information in cell R7 contains the word "liquid" it populates the word liquid to S7

e.g cell R7 might contain "liquid, hazardous, waste" in which case S7 will show "liquid".

Excel Formula:
IF(ISNUMBER(SEARCH("liquid",R7)),"Liquid","")

I am trying to figure out how to do this so it also looks for "Solid" and "gaseous" and populates the found word into S7

There will only ever be one of these words in R7 so it will either be "liquid, hazardous, waste" or "solid, hazardous, waste" or "gaseous, hazardous, waste"

I need it to find out which of these words it contains and put it into cell R7

thanks in advance

Rory
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Do you just want to return the 1st word from R7 to S7?
 
Upvote 0
try this

Book1
ABCD
1liquid, hazardous, wasteLiquidLiquid
2gaseous, wasteGaseousSolid
3waste Gaseous
4solid, wasteSolid
98
Cell Formulas
RangeFormula
B1:B4B1=IFERROR(LOOKUP(2,1/ISNUMBER(SEARCH($D$1:$D$3,A1)),$D$1:$D$3),"")
 
Upvote 0
Solution
Do you just want to return the 1st word from R7 to S7?
Most of the time solid, liquid or gaseous would be the first word in the list but if it isnt then it would be good to still find it.

thanks

Rory
 
Upvote 0
Thanks Guys

Alans suggestion works perfect for me.

thanks for both your replies :)

Rory
 
Upvote 0
@AlanY
I see your using the latest version of XL2BB, so you might want to update your signature. ;)
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

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