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!

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD="align: center"]A2[/TD]
[TD="align: center"]B2[/TD]
[TD="align: center"]C2[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]E2[/TD]
[TD="align: center"]F2[/TD]
[/TR]
[TR]
[TD]24-Dec-17[/TD]
[TD]25-Jan-18[/TD]
[TD]22-Feb-18[/TD]
[TD]25-Mar-18[/TD]
[TD]25-Apr-18[/TD]
[TD]24-May-18[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
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,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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