Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2002 - find a string of text and allow me to do a formula

Status
Not open for further replies.

cgilmore

Instructor
Mar 8, 2001
41
US
I am working on a spreadsheet which has units to be installed. When we install a cold unit such as an ilc or a rlc the price stays the same, but if we install a hot unit such as an ilh or a rlh then we need to up the price by certain % which can change from job to job. I have unit names in column a. Prices in col b. I need a formula in column c which would say if you find an ilh or a rlh in a3 then b3*$c$1, else b2.
col a col b col c
12%
25-5-ilc 48.51
25-5ilh 48.51
25-5rlc 52.20
25-5rlh 52.20
 
If the fact of the last character = "h" is sufficient to identify the case, then you can use a formula like this:
Code:
C2: =B2+IF(RIGHT(A2,1)="h",ROUND($C$1*B2,2),0)
If you need to test specifically for "rlh" or "ilh" then this varation would do:
Code:
C2: =B2+IF(OR(RIGHT(A2,3)="rlh",RIGHT(A2,3)="ilh"),ROUND($C$1*B2,2),0)


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top