days ranges apply fee

mick001

New Member
Joined
Jun 1, 2018
Messages
4
Hello,

Can you help me with the following.

In excel I need to calculate how long somebody stays and a apply a different fee.

between 1 and 7 nights 1,5 euro
between 8 and 14 nights 2,1euro
longer then 15 nights longer no extra charge.

do you have an idea? please no vsb..


thanks alot
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
assuming your dates are in A1 and B1 then in C1 put

=IF(AND((B1-A1)>0,(B1-A1)<8),1.5,IF(AND((B1-A1)>7,(B1-A1)<15),2.1,0))
 
Upvote 0
assuming your dates are in A1 and B1 then in C1 put

=IF(AND((B1-A1)>0,(B1-A1)<8),1.5,IF(AND((B1-A1)>7,(B1-A1)<15),2.1,0))

Thanks for your help but the formula doesn't seems to work. excel doesn't accept it.

the dates are in B5 and C5, I changed that but still it doens't acept it.
I made a mistake when it is longer than 14 nights the fee is 1,1

thanks for your help!!
 
Upvote 0
Assuming your dates are in B5 and C5

=IF(AND((C5-B5)>0,(C5-B5)<8),1.5,IF(AND((C5-B5)>7,(C5-B5)<15),2.1,IF((C5-B5)>14,1.1,0)))

tested and works
 
Upvote 0
Assuming your dates are in B5 and C5

=IF(AND((C5-B5)>0,(C5-B5)<8),1.5,IF(AND((C5-B5)>7,(C5-B5)<15),2.1,IF((C5-B5)>14,1.1,0)))

tested and works

thanks for your help, I still get this error message:



C:\Users\nl112503\AppData\Local\Temp\SNAGHTML1efedd41.PNG

C:\Users\nl112503\AppData\Local\Temp\SNAGHTML1efedd41.PNG
 
Upvote 0
You cannot paste images like that.

There are tools you can use to post screen images. They are listed in Section B of this link here: http://www.mrexcel.com/forum/board-a...forum-use.html.

Also, there is a Test Here forum on this board that you can use to test out these tools to make sure they are working correctly before using them in your question.
 
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,839
Members
449,193
Latest member
MikeVol

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top