Using IF function with Text?

  • Thread starter Thread starter RussD
  • Start date Start date
R

RussD

Hopefully this is an easy one, I have a column of text and numerical
data and I want to distinguish certain cells that contain the word
"Diesel".

My data looks like this:

Column C
2000cc 150 bhp
1900cc 120bhp
2000cc Diesel
2000cc 150 bhp
1900cc 120bhp
2000cc Diesel


Basically I want to duplicate the data in another column but where the
cell has Diesel in it I get a "D" and where the cell doesn't contain
the word diesel I get a "P".

I'm not sure if I should use lookup or the IF command, can anyone help
me please?

Thankyou in advance
 
RussD,

The following will return D if C1 contains the word diesel and P
if it doesn't.

=IF(ISNUMBER(SEARCH("diesel",C1)),"D","P")

Dan E
 
Back
Top