show if Saturday in date range with time

Sebas_

New Member
Joined
Apr 8, 2020
Messages
7
Office Version
  1. 2010
Platform
  1. MacOS
Hi!

New here, I'm struggling with a formal I wasn't able to find on the web.

I'm working for a hotel, and I would like to show if the bookings have a Saturday included or not.
Problem: the dates include the time..

I have the IN date:
1586377385593.png

and the OUT date:
1586377401247.png


I would need to show if those bookings include the night of Saturday in them, but I am struggling, could you help me please?

Ideally I would like to add a column at the end (let's name it: includes Saturday), and have an answer "Saturday", or just leave the cell blank if not.

Note: on this example, please take into account that the last night is the 11st (check out on the 12th, but I don't care if the 12 is a Saturday or not)

Many thanks for your help!

Best
 
Ah ok i didnt think of the times..

=IF(MAX(0,NETWORKDAYS.INTL(A1,B1-(WEEKDAY(B1)=7),"0000010"))<>INT(B1)-(WEEKDAY(B1)=7)-INT(A1)+1,"Saturday","No Saturday")
Yes!! This one works fine! Thanks a lot, I would never have been able to fin that myself! Greatly appreciated!

Greatly "abusing" your knowlegde, would you have a formula to find if there is a public holiday? I did create a list and have no problem finding the number of working days in between 2 dates (used for calculating paid holidays for example), but I am a bit stuck in my process to have the same behavior: is there a public holiday in this date interval? (with once again checkin date incluse holidays but checkout not including them)?

Thanks a million, you really made my (confided) day!
 

Attachments

  • Capture d’écran 2020-04-09 à 02.01.29.jpg
    Capture d’écran 2020-04-09 à 02.01.29.jpg
    135 KB · Views: 2
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
(retyping my reply as my previous post didn't work)

Ah ok i didnt think of the times..

=IF(MAX(0,NETWORKDAYS.INTL(A1,B1-(WEEKDAY(B1)=7),"0000010"))<>INT(B1)-(WEEKDAY(B1)=7)-INT(A1)+1,"Saturday","No Saturday")

This work!! Thanks a million!!
I would definilty not have been able to come up with such a formula by myself, your help is truly appreciated! You really made my (confined) day!

Would you mind if I "abuse" your kindness a bit more? I would also like to find if there is any public holidays in the date range. I already have a list of public holidays in Colombia (we use it to track holidays of the staff), but I' m unable to find if there are some in the range of the bookings (same as before: checkin date counts, but no check out date). Thanks a million, you would be rewarded by my eternal gratitude!

Best
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,876
Members
449,056
Latest member
ruhulaminappu

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