EDATE function

mrexcelrc

Board Regular
Joined
Oct 14, 2010
Messages
140
Office Version
  1. 365
Platform
  1. Windows
Hello, I need help with this function. Is there a way for this function to factor in weekends and named holiday? In other words if that particular target date is a weekend the date will be adjusted to a weekday and if that particular target date is a holiday the date will be adjusted to the next good working day.

Thanks in advance.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try:
Code:
=WORKDAY(A1,A2,A3)
Where
A1 = your start date
A2 = number of days
A3 = holiday date*
If you make a range of holiday dates (obtain these by doing a google search, enter into your sheet and then highlight the whole range and name it, passing that name variable into the above function instead of A3), the output will be as required.

E.g.
A1 = 01/07/2011
A2 = 9 days
A3 = 07/07/2011
Code:
=WORKDAY(A1,A2,A3)
Will give answer of 15th July 2011
 
Upvote 0
Hi,

In my example below, 9/5/2011 is a holiday so i need the formula to come up with the correct date of 9/6/2011. Also in your example below and in my case, A2 is a variable.




Start date=7/5/2011
EDATE("7/5/2011",2)=9/5/2011
 
Upvote 0
Hello, I need help with this function. Is there a way for this function to factor in weekends and named holiday? In other words if that particular target date is a weekend the date will be adjusted to a weekday and if that particular target date is a holiday the date will be adjusted to the next good working day.

Thanks in advance.

Something like:

=WORKDAY(A1,EDATE(A1,1)-A1,Holidays)

where A1 houses a date of interest and Holidays stands for a range housing
the holiday dates. Replace 1 with a cell housing an edate parameter value.
 
Upvote 0
Hi Mark,
I assume A1 is the start date. What is B1? What is -1, 1?





Try this:

=WORKDAY(EDATE(A1,B1)-1,1,Holidays)

Markmzz
 
Upvote 0
Try this:

=WORKDAY(EDATE(A1,B1)-1,1,Holidays)

Markmzz

A1 is your start date and B1 the number of months you wish to add. holidays is a named range containing your holiday dates.

If A1 is 7/5/2011 and B1 is 2 as per your example....and if 9/5/2011 is on the holiday list then the formula will return 9/6/2011 as you asked......
 
Upvote 0
Hi Mark,
I assume A1 is the start date. What is B1? What is -1, 1?





Try this:

=WORKDAY(EDATE(A1,B1)-1,1,Holidays)

Markmzz

=WORKDAY(EDATE(A1,2)-1,1,Holidays)

means: Create EDATE that is 2 months later than A1 (say X), subtract 1 day from that date (X-1), and calculate WORKDAY using X-1 where the number of days to use is 1, taking Holidays into account.
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,740
Members
452,940
Latest member
Lawrenceiow

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