How do I use a logical IF statement with TEXT in EXCEL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am working in Excel. I am trying to place a numerical value in a cell if
another cell has the text HPU.

For example: Cell D4 has the text string "75hp Diesel HPU", I want $40.00
to be placed in Cell B2. This is based on the Cell D4 having the text "HPU".

Do I use compare, IF, IS or what. Excel Help did not help me too much. Who
knows maybe this can not be done.
 
on B2

=if(isnum(search("hpu",d4)),40,0)

hope it helps
regards from Brazil
Marcelo

"SchnidRoCK" escreveu:
 
Thank you Marcelo - but what appears in B2 is #NAME?. So I do not think it
worked. I copied and pasted the function from your response, so I know that
I got the function right.
 
SchnidRoCK,

There is no worksheet function "isnum"

=IF(ISNUMBER(SEARCH("hpu",D4)),40,0)

HTH,
Bernie
MS Excel MVP
 
sorry the mistake, ;-) my excel is in brazilian Portuguese...

regards

"Bernie Deitrick" escreveu:
 
That fixed my problem thank you so much......

Marcelo said:
sorry the mistake, ;-) my excel is in brazilian Portuguese...

regards

"Bernie Deitrick" escreveu:
 
Back
Top