"If this, multiply by this" type of equation

C

carsch

In need to enter an amount in H9 that is equal to an amount in B5 and then
the amount entered in either B14 or B15 depending. Ex: B5 is either a compact
car or a luxury car. B14 contains the charge/day for compact. B15 contains
the charge/day for luxury. So, if B5 is compact, I need to multiply it by
B14. BUT, if B5 is luxury, then I need to multiply it by B15. How would I set
up this equation for an "if this vehicle, multiply by this amount"?
 
P

Pete_UK

Presumably you have number of days somewhere - assume this is A1. A
formula like this in H9 should give you what you want:

=IF(B5="compact",A1*B14,IF(B5="luxury",A1*B15,"no car"))

If you don't have either "compact" or "luxury" in B5 you will get the
message "no car".

Hope this helps.

Pete
 
Top