IF Formula

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

I have lists of insurance names followed by their types in once cell
example:
cigna WC
Aetna GRP
Progressive PIP

i would like to have a column that would show me the type so i can sort by
type (my report doesnt have 'type' column)

i need the formula to say
"if cell contains 'WC' then the result equal 1, if the cell contains 'grp'
then the result would equal 2, if the cell contains 'PIP' then the result
would equal 3"

i cannot figure out how to write that kind of formula

thank you MS community
 
Since both Name & Type are in one cell, assuming your first cell is A1, put
this in B1 and drag down.

=IF(ISERROR(SEARCH("wc",A1)),IF(ISERROR(SEARCH("grp",A1)),IF(ISERROR(SEARCH("pip",A1)),"Type
not found",3),2),1)

Search is not case sensitive and will produce a #VALUE! error if the Value
is not found. By using IsError function, value not found = True, value found
= False; reverse logic at work here. If first value not found (IsError =
True), then go to the next IF statement, etc.
Change the reference to A1 in the formula to wherever your first data cell
is.

Mike F
 
Try this formula, if no match, you will get 0. FYI, the Find function is
case sensitive.

=ISNUMBER(FIND("WC",A1))*1+ISNUMBER(FIND("GRP",A1))*2+ISNUMBER(FIND("PIP",A1))*3

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

IF formula 3
Concat a three column range into one cell Then Next... 2
Excel Need Countifs Formula Help 0
INPUT BOX in excel 2003 2
Excel VBA 1
Excel Formula 3
Find Copy Paste Special 3
measuring waves in the currency market 11

Back
Top