IF with many conditions

sburkhar

Active Member
Joined
Oct 4, 2006
Messages
363
I need to write a formula that states:

If the cell is empty then nothing
if it contains "terminal" then "Term"
if it contains "wire"" then "wire"
if it contains anything else then "other".

but the cell will contain something like this:

70031171 Terminal;BC;Press/Lug/Tab/Pipe

so the formula will need to select the word "Terminal" out of the string of words to return "term" "wire" or "other"
Excel 2003
 
MrKowz,

I ran the formula through the evalator and see that having Terminal in A1 generated a 1 so returned Term....why does it return a 1?

because it is doing a search for the "Terminal" and found it as the 1st character. Search will return a number at the number of characters placement. If you have Bus Terminal then it would have returned 4. Make sense?
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,224,586
Messages
6,179,707
Members
452,939
Latest member
WCrawford

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