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
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Ok just a bit of clarity on the rules. If you arrive at any time on a Saturday its a yes but if you leave on a saturday it doesnt count?
 
Upvote 0
Ok just a bit of clarity on the rules. If you arrive at any time on a Saturday its a yes but if you leave on a saturday it doesnt count?
Hi Steve,

Yes, indeed, you understood right: arriving on anytime a Saturday counts as a Saturday night, but leaving on a Saturday mornin doesn't.
Thanks!
 
Upvote 0
Im sure there must be easier and i think this will work but it needs testing:

=IF(MAX(0,NETWORKDAYS.INTL(A1,B1-(WEEKDAY(B1)=7),"0000010"))<>B1-(WEEKDAY(B1)=7)-A1+1,"Saturday","No Saturday")
 
Upvote 0
Thanks, great, I'm going to try this!
Thanks a million!
 
Upvote 0
Thanks, but unfortunately it seems that it doesn't work..
It displays Saturday on all cells, but night of Jan 1st is Wednesday :(

PS: I'm using LibreOffice on my Mac (the one with Excel is in the office right now), so I had to change the "," to ";"
 

Attachments

  • Capture d’écran 2020-04-08 à 23.31.17.jpg
    Capture d’écran 2020-04-08 à 23.31.17.jpg
    213.8 KB · Views: 4
Upvote 0
Date format is as follow:
01/01/2020 16:48:04

It works fine with the other formulas I have in the spreadsheet (advanced bookings...)
 

Attachments

  • Capture d’écran 2020-04-08 à 23.44.00.jpg
    Capture d’écran 2020-04-08 à 23.44.00.jpg
    80 KB · Views: 5
Upvote 0
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")
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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