Dates/Autofill

razaas

New Member
Joined
Jul 18, 2011
Messages
10
Hi,
I have a manually entered date in cell B2 (24-Dec-17), I need a formula to fill the next dates from cell C2 onwards, the criteria for dates to be 25th of each month if the 25 is not a Friday or Saturday and also not a holiday, sample shown in the table below. The holidays are listed in a range from cell B5 to B25. If the 25th is a Friday, Saturday or Holiday then I need an earlier date that is between Sunday to Thursday which meets the criteria. Hope it makes sense and someone will be able to provide a solution. Thanks!

A2B2C2D2E2F2
24-Dec-1725-Jan-1822-Feb-1825-Mar-1825-Apr-1824-May-18

<tbody>
</tbody>
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Try this in C2 and drag across:

=WORKDAY.INTL(DATE(YEAR(EDATE(B2,1)),MONTH(EDATE(B2,1)),26),-1,7,$B$5:$B$25)
 
Upvote 0
Or this in C2 drag across:
=WORKDAY.INTL(26+EOMONTH(B2,0),-1,7,$B$5:$B$25)

Logic
add 26 to last day of month of date in cell B2 and get previous working day (-1) based on Fri/Sat weekends (7) taking account of holidays
 
Last edited:
Upvote 0
Thanks a lot Steve and Yongle, both the formulas works, highly appreciate your quick response. Have a great day, thanks.

Try this in C2 and drag across:

=WORKDAY.INTL(DATE(YEAR(EDATE(B2,1)),MONTH(EDATE(B2,1)),26),-1,7,$B$5:$B$25)

Yongle
Re: Dates/Autofill
Or this in C2 drag across:
=WORKDAY.INTL(26+EOMONTH(B2,0),-1,7,$B$5:$B$25)
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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