Formula please

M

Mel

Hi, hope someone can help. I am trying to get a value in dollars in one cell
dependant on another cell being one of two letters. If a particular letter
appears then the cell will give the result of a third cell multiplied by 9%,
if it is a different letter it will give 9% of another cell.

eg

the result will be in K30
if K15 is "T" then k30 will be p20*9%, but
if K15 is "P" then K30 will be P21*9%

Thank you if anyone can help.

Mel
 
D

David McRitchie

Hi Mel,
K30: =IF(K15="T",P20*.09,IF(K15="P",P21*.09,"")

You did not say what the value would be otherwise so I used
a null string. Null string will be ignored in SUM but would result in
an error if used as an addend in a formula. If used in another
formula you might want to use 0 (zero)..
 
P

Pete_UK

Enter this in cell K30:

=IF(K15="T",P20*0.09,IF(K15="P",P21*0.09,0))

You don't say what you want to happen if K15 is neither of these values
- this formula returns 0 in this case.

Hope this helps.

Pete
 
D

David McRitchie

was missing the close paren at the end, but then you already had another answer anyway.
K30: =IF(K15="T",P20*.09,IF(K15="P",P21*.09,""))
 
M

Mel

sorry, I meant last bit i.e. I put a zero in after the 9% and it works, well
I hope it does, as I am so tired, I've tried it a couple of times and think
this will do it. Thanks again
Mel

=IF(K15="T", P20*9%, IF(K15="P",P21*9%,0))
 
P

Pete_UK

It's mid-afternoon here, but goodnight wherever you are - thanks for
feeding back.

Pete
 
Top