Working days formula

Lux Aeterna

Board Regular
Joined
Aug 27, 2015
Messages
191
Office Version
  1. 2019
Platform
  1. Windows
Hello everyone!
I have an excel table from Monday to Friday and I want to have the date added automatically. I have found how to add the first working day of each month, but not always the first working day is Monday. So I'd like to have that day empty and start auto-date from Tuesday or whichever working day is the first one of that month. Take a look at the table, I thing it's easier to understand what I am trying to do.

Monday(date, if it's the 1st working day, blank if not)Tuesday(date, if it's the 1st working day, blank if not)Wednesday(date, if it's the 1st working day, blank if not)Thursday(date, if it's the 1st working day, blank if not)Friday(date, if it's the 1st working day, blank if not)
Monday(above date +7)Tuesday(above date +7)Wednesday(above date +7)Thursday(above date +7)Friday(above date +7)
Monday(above date +7)Tuesday(above date +7)Wednesday(above date +7)Thursday(above date +7)Friday(above date +7)
Monday(above date +7)Tuesday(above date +7)Wednesday(above date +7)Thursday(above date +7)Friday(above date +7)
Monday(above date +7, blank if next month)Tuesday(above date +7, blank if next month)Wednesday(above date +7, blank if next month)Thursday(above date +7, blank if next month)Friday(above date +7, blank if next month)

Thank you in advance!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
MrExcelPlayground5.xlsx
BCDEF
1November 2021
2MondayTuesdayWednesdayThursdayFriday
312345
489101112
51516171819
62223242526
72930   
Sheet3
Cell Formulas
RangeFormula
B3B3=IF(WEEKDAY(DATE(YEAR(B1),MONTH(B1),1),16)<4,DATE(YEAR($B$1),MONTH($B$1),1)+(3-WEEKDAY(DATE(YEAR(B1),MONTH(B1),1),16)),"")
C3C3=IF(B3="",IF(WEEKDAY(DATE(YEAR(B1),MONTH(B1),1),16)=4,DATE(YEAR($B$1),MONTH($B$1),1),""),B3+1)
D3D3=IF(C3="",IF(WEEKDAY(DATE(YEAR(B1),MONTH(B1),1),16)=5,DATE(YEAR($B$1),MONTH($B$1),1),""),C3+1)
E3E3=IF(D3="",IF(WEEKDAY(DATE(YEAR(B1),MONTH(B1),1),16)=6,DATE(YEAR($B$1),MONTH($B$1),1),""),D3+1)
F3F3=IF(E3="",IF(WEEKDAY(DATE(YEAR(B1),MONTH(B1),1),16)=7,DATE(YEAR($B$1),MONTH($B$1),1),""),E3+1)
B4:B6B4=F3+3
C4:F6C4=B4+1
B7B7=IF(MONTH(F6+3)=MONTH($B$1),F6+3,"")
C7:F7C7=IF(B7<>"",IF(MONTH(B7+1)=MONTH($B$1),B7+1,""),"")
 
Upvote 0
Solution
This one has been working like a charm so far!

Here's a new challenge if possible. I'd like to have a list of dates on the right, that if they match with the date on my sheet, the arrival cells give me different times (i.e. 14:00)
1637246030614.png

By the way, the cell bellow "Arrival" (B10) has this formula
=IF(C8="";"";$B$39)
meaning that if the date (C8) is empty, arrival is empty. if not, arrival is the content of cell B39 (B39=7:00).

Thank you in advance!
 
Upvote 0
This one has been working like a charm so far!

Here's a new challenge if possible. I'd like to have a list of dates on the right, that if they match with the date on my sheet, the arrival cells give me different times (i.e. 14:00)
View attachment 51575
By the way, the cell bellow "Arrival" (B10) has this formula
=IF(C8="";"";$B$39)
meaning that if the date (C8) is empty, arrival is empty. if not, arrival is the content of cell B39 (B39=7:00).

Thank you in advance!
Don't bother dealing with it, I managed to do it! Here's the formula in case anyone needs it
=IF(OR(A1=D3;A1=D4;A1=D5;A1=D6;A1=D7);"14:00";"7:00")
A1 is the date box, D3-D7 are the condition boxes. Meaning, if the date in A1 matches any of the dates put in D3-D7, give "14:00 as arrival. If it doesn't, give 7:00 as arrival.
 
Upvote 0

Forum statistics

Threads
1,215,433
Messages
6,124,863
Members
449,195
Latest member
MoonDancer

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