ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF Statements - Novice (https://www.excelbanter.com/excel-worksheet-functions/192739-if-statements-novice.html)

Joe

IF Statements - Novice
 
Hi i have a problem with this simple IF statement,

what i want is to calculate one amount (90) for 0-3hrs then multiply by (30)

So the charge for 1,2 or 3 hours will be £90 but then 4 hours £120, 5 hours
£150 etc.

What I have so far is:

=if(N95<=3,90,N95*30) This works fine except if the total in N95 is 0 it is
still showing a charge of £90 which should be £0.00.

Any help on this would be great as i haven't used IF statements in ages.


Jarek Kujawa[_2_]

IF Statements - Novice
 
=IF(N95=0,0,IF(N95<=3,90,N95*30))

or even better

=IF(N95=0,0,IF(AND(N95<=3,90,N950),90,N95*30))

Jarek Kujawa[_2_]

IF Statements - Novice
 
oops, sorry, should be:

=IF(N95=0,0,IF(AND(N95<=3,N950),90,N95*30))

Marcelo

IF Statements - Novice
 
=if(N95=0,0,IF(N95<=3,90,N95*30))

--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Joe" escreveu:

Hi i have a problem with this simple IF statement,

what i want is to calculate one amount (90) for 0-3hrs then multiply by (30)

So the charge for 1,2 or 3 hours will be £90 but then 4 hours £120, 5 hours
£150 etc.

What I have so far is:

=if(N95<=3,90,N95*30) This works fine except if the total in N95 is 0 it is
still showing a charge of £90 which should be £0.00.

Any help on this would be great as i haven't used IF statements in ages.


Stefi

IF Statements - Novice
 
Another approach:
=IF(AND(N950,N95<=3),90,N95*30)

Regards,
Stefi

Joe ezt *rta:

Hi i have a problem with this simple IF statement,

what i want is to calculate one amount (90) for 0-3hrs then multiply by (30)

So the charge for 1,2 or 3 hours will be £90 but then 4 hours £120, 5 hours
£150 etc.

What I have so far is:

=if(N95<=3,90,N95*30) This works fine except if the total in N95 is 0 it is
still showing a charge of £90 which should be £0.00.

Any help on this would be great as i haven't used IF statements in ages.



All times are GMT +1. The time now is 11:37 AM.

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