Solved

End of Month, use preceding workday

Posted on 2015-01-08
4
142 Views
Last Modified: 2015-01-08
Experts, I need the end of the month but use preceding workday if lands on a holiday.  I think the formula is similar to the below but I get an error.

=WORKDAY(EOMONTH(H124,1),1)),1),Holidays_US_Jap)

thank you
0
Comment
Question by:pdvsa
4 Comments
 
LVL 13

Accepted Solution

by:
akb earned 500 total points
ID: 40539081
There is a useful reference to the WORKDAY function at http://www.excelfunctions.net/Excel-Workday-Function.html

Your formula should look like:
=WORKDAY(EOMONTH(H124,1)+1,-1)

This takes the first day of the next month then returns the previous work day which will be the last work day of the month you want.

You could add a parameter as follows:
=WORKDAY(EOMONTH(H124,1)+1,-1,Z1:Z9)
where Z1:Z9 contains dates you want to include as holidays.
0
 
LVL 29

Expert Comment

by:gowflow
ID: 40539093
What is
Holidays_US_Jap

a named range ?

the formula should rather be:
=WORKDAY(EOMONTH(H124,1),1,Holidays_US_Jap)

gowflow
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40539097
I'm restating to be sure I understand exactly what you need.

Given a date value (in this case, in cell H124), you want to return the last business day of the following month, excluding holidays (listed in the range Holidays_US_Jap).  Correct?

If so, this formula will do that:
=WORKDAY(EOMONTH(H124,1),-1,Holidays_US_Jap)

For example, make January 30 a holiday (temporarily) in your Holidays_US_Jap table.  Then make H124 any date in December, 2014.  Since January 31 falls on a Saturday, January 30 would normally be returned.  But if you make January 30, 2015 a holiday, January 29 is returned instead.

Regards,
-Glenn
0
 

Author Closing Comment

by:pdvsa
ID: 40539105
Perfect, thank you
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question