ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   "If this, multiply by this" type of equation (https://www.excelbanter.com/excel-worksheet-functions/85774-if-multiply-type-equation.html)

carsch

"If this, multiply by this" type of equation
 
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"?

Pete_UK

"If this, multiply by this" type of equation
 
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


carsch

"If this, multiply by this" type of equation
 
Thank you!!

"Pete_UK" wrote:

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



Pete_UK

"If this, multiply by this" type of equation
 
You're welcome.

Pete



All times are GMT +1. The time now is 08:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com