Target dates to submit reports

Salamullah

Board Regular
Joined
Mar 28, 2011
Messages
221
Target dates excluding holidays (Fri & Sat) of each month to put through formula in plan sheet to get reports from different people, please help me to make a formula in each month based on work days (WKD)

Report WKD Jan Feb Mar ... ....
A 2 2/1/19 4/2/19 4/3/19 ... ....
B 4 6/1/19 6/2/19 6/3/19 ... ....
C 9 13/1/19 13/2/19 13/3/19 ... ....

I have downloaded Calendar Template from excel and wanted to apply formula from it.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi Salamullah
If first due date is in A2 use the formula en B2 for next month due date
Code:
[COLOR=#444444][FONT=Calibri]=IF(WEEKDAY(EDATE(A2,1))=7,EDATE(A2,1)+1,IF(WEEKDAY(EDATE(A2,1))=6,EDATE(A2,1)+2,EDATE(A2,1)))[/FONT][/COLOR]
Cheers
Sergio
 
Last edited:
Upvote 0
Hi Salamullah
If first due date is in A2 use the formula en B2 for next month due date
Code:
[COLOR=#444444][FONT=Calibri]=IF(WEEKDAY(EDATE(A2,1))=7,EDATE(A2,1)+1,IF(WEEKDAY(EDATE(A2,1))=6,EDATE(A2,1)+2,EDATE(A2,1)))[/FONT][/COLOR]
Cheers
Sergio

Hi Sergio,

Many thanks

I am a little bad student of excel so unable to understand correctly !

while applying your given formula in B2 based on A2 which is work day 2 the result is coming 2nd Feb but it should come 4th Feb because 1st is Friday and 2nd is Sat (holidays), 2nd work day is Monday which is 4th of Feb !
I have formatted cell B2 with date
Please see also when I copied the formula in C2 for March its not giving 4th Mar.
 
Last edited:
Upvote 0
Hi Salamullah,
The problem is
WEEKDAY that works different in every language
So I used the standard that is:
WEEKDAY accepts a date and returns a number between 1-7 representing the day of week for that date. By default, WEEKDAY returns 1 for Sunday and 7 for Saturday, as shown in the table below:
Result Meaning
1 Sunday
2 Monday
3 Tuesday
4 Wednesday
5 Thursday
6 Friday
7 Saturday

The formula uses WEEKDAY(EDATE(A2,1))=7 for Saturday and WEEKDAY(EDATE(A2,1))=6 to avoid Fridays and then add 1 and 2 to go to a Sunday, but now I realize that you want a Monday

First please check in you machine what number you get for a Friday with the formula in B3 =WEEKDAY(A3) and in A3 write a date that is Friday, then tell me.

Next as you want to to lay in Monday not a Sunday the formula should be:

Code:
[COLOR=#444444][FONT=Calibri]=IF(WEEKDAY(EDATE(A2,1))=7,EDATE(A2,1)+2,IF(WEEKDAY(EDATE(A2,1))=6,EDATE(A2,1)+3,EDATE(A2,1)))[/FONT][/COLOR]


Cheers
Sergio


 
Upvote 0
Good 6 for Friday is good, use the corrected formula in B2 and when A2 has the January due date
Code:
[COLOR=#444444][FONT=Calibri]=IF(WEEKDAY(EDATE(A2,1))=7,EDATE(A2,1)+2,IF(WEEKDAY(EDATE(A2,1))=6,EDATE(A2,1)+3,EDATE(A2,1)))[/FONT][/COLOR]
Then copy right and down
If it does not work, please tell me the date you get so I can correct what is wrong
Cheers
Sergio
 
Upvote 0
Hi Sergio

The result coming is 2n Feb which is Sat in calendar

I put target work day number 2 in A2 and applied formula in B2 whereas actual date should be Monday 4th Feb similarly if I put 6 in A3 the formula is giving 6th Feb instead of 10th Feb.
 
Last edited:
Upvote 0
Hi Sergio,

Its working many thanks, I think I have not explained correctly,
the formula you gave is dependent on previous month, where as I have fixed number in each line in column A and formula required on that number for all months

like if number is 8 the date in Apr is 10 & 12 in May.
 
Upvote 0

Forum statistics

Threads
1,214,800
Messages
6,121,641
Members
449,044
Latest member
hherna01

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