Nested IF Formula with "contains"

Roar

New Member
Joined
May 18, 2011
Messages
25
Hi, thank you for reading.

What I am looking for is a formula like

If B18 Contains Apple, then I18 = "$6000" if B18 contains Essential, then I18=$12000" if B18 contains Access then I18 = "22000"

Can something like that work? I just need it to find one word in a large paragraph of text.

Oh, and I guess one more variable is that B18 is actually a merged cell covering B18:g18 so I hope it is okay to use B18?

Thank you for your help, I have tried about 10 things from the internet.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
re: Nested IF Formula with "contains"

=LOOKUP(9.999999999E+307,(SEARCH({" Apple "," Essential "," Access "}," " &B18&" ")),{6000,12000,22000})

Format result cell as you like.

This does assume there is only one occurrence of one of the words.
 
Last edited:
Upvote 0
Try

=SUM(COUNTIF(B18,"*"&{"Apple","Essential","Access"}&"*")*{6000,12000,22000})
 
Last edited:
Upvote 0
I like that. The only problem I see is that it wouldn't check for exact words.

For example, Essentially would also match in that formula.
 
Upvote 0

Forum statistics

Threads
1,224,779
Messages
6,180,900
Members
453,006
Latest member
Zero_Echo99

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