Solved

End of Month, use preceding workday

Posted on 2015-01-08
4
120 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now