Pv488

New Member
Joined
Feb 16, 2018
Messages
5
Hi,
I am struggling a bit to get my date formulas working. In a sense it is a 2 pt question.
I basically have a date of which I need to add X amount of days which may go into into the next month at times. Then if that target date after getting added x days is a weekend or holiday it needs to go to the next working day. I have been using the workday & net work days function but I am not getting the desired result.

Example: Item date is 3/13/2017 (A2). I want to add 30 days to it I would get 4/12/2017 using =DATE(year(A2),(MONTH(A2),DAY(A2))+30.
If I use =WORKDAY(A2,30,"Holiday Table Schedule") I get 4/25/2017 which is incorrect. The date function gives me the desired date but I need it to account for Holidays and weekends for other dates.

Additionally, if I am looking to get the 15th day of following month from a date and if that 15th day falls on weekend or Holiday it gets rounded to next full working day. Example here is starting date (B2) is 3/7/2017. =WORKDAY(OEMONTH(B2,0),15,"Holiday Schedule) = 4/24/2017. I need it to get me 4/17/2017 as the 15th day falls on Weekend so it should go to the 17th.

Thanks
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Re: Help with Date formula

Welcome to the Board!

I get 4/25/2017 which is incorrect. The date function gives me the desired date but I need it to account for Holidays and weekends for other dates.
=WORKDAY(A2,30,"Holiday Table Schedule")
Have you set up your Holiday Table Schedule?
Not that this will not work "Holiday Table Schedule". That is a string. This argument needs to be a range or named range. If it is a named range, it should not have double-quotes around it (which makes it a literal string).

See: https://www.techonthenet.com/excel/formulas/workday.php
 
Last edited:
Upvote 0
Re: Help with Date formula

Thank you for the welcome! and yes i should've clarified I did set up the schedule. I have a table list for 5 years of all holidays with their dates which I reference into the formula.
 
Upvote 0
Re: Help with Date formula


Excel 2010
ABC
112-Apr-17
213-Mar-173024-Apr-17
317-Apr-17
4
4c
Cell Formulas
RangeFormula
C1=A2+30
C2=WORKDAY(A2,B2,Hol)
C3=WORKDAY(DATE(YEAR(A2),MONTH(A2)+1,14),1)
Named Ranges
NameRefers ToCells
Hol='4c'!$I$2:$I$5
 
Upvote 0
Re: Help with Date formula

Excel 2010
ABC
112-Apr-17
213-Mar-173024-Apr-17
317-Apr-17
4

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
4c

Worksheet Formulas
CellFormula
C1=A2+30
C2=WORKDAY(A2,B2,Hol)
C3=WORKDAY(DATE(YEAR(A2),MONTH(A2)+1,14),1)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>


The C3 Formula worked terrific to get the 15th day of next month and if weekend or Holiday gave the next working date, just what I needed thank you.

Now I need to get the +30 days from date and then next working date if Holiday or Weekend Working.
 
Upvote 0
Re: Help with Date formula

Did you try the formula in C2?

Ensure you use the relevant range for your list of Holidays.
You can name the list of Holidays.


Excel 2010
ABC
112-Apr-17
213-Mar-173024-Apr-17
317-Apr-17
4
524-Apr-17
4c
Cell Formulas
RangeFormula
C1=A2+30
C2=WORKDAY(A2,B2,I2:I5)
C3=WORKDAY(DATE(YEAR(A2),MONTH(A2)+1,14),1)
C5=WORKDAY(A2,30,I2:I5)
 
Last edited:
Upvote 0
Re: Help with Date formula

As I said, if you actually used the formula:
Code:
[B]=WORKDAY(A2,30,"Holiday Table Schedule")[/B]
it will not work, as "Holiday Table Schedule" is not a valid range (it is a string).
 
Upvote 0
Re: Help with Date formula

I managed to figure out +30 days formula by using =WORKDAY(B2+30-1,1,$S$7:$T$15) The $S$7:$T$15 is the reference to the list of dates I have in a table format in my worksheet as seen below.

NYSE Holidays
20172018
New Year’s Day1/2/20171/1/2018
Martin Luther King, Jr. Day1/16/20171/15/2018
Washington’s Birthday2/20/20172/19/2018
Good Friday4/14/20173/3/2018
Memorial Day5/29/20175/28/2018
Independence Day7/4/20177/4/2018
Labor Day9/4/20179/3/2018
Thanksgiving Day11/23/201711/22/2018
Christmas Day12/25/201712/25/2018

<colgroup><col><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0
Re: Help with Date formula

Yes I tried but it just gives me +30 days not accounting if end date was holiday or weekend but I have managed to figure it out using some tweeks with your formulas and use =WORKDAY(B7+30-1,1,$S$7:$T$15). Thank you for help!
 
Upvote 0

Forum statistics

Threads
1,215,684
Messages
6,126,199
Members
449,298
Latest member
Jest

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