Link to home
Start Free TrialLog in
Avatar of pdvsa
pdvsaFlag for United States of America

asked on

End of Month, use preceding workday

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
ASKER CERTIFIED SOLUTION
Avatar of akb
akb
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jacques Geday
What is
Holidays_US_Jap

a named range ?

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

gowflow
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
Avatar of pdvsa

ASKER

Perfect, thank you