PDA

View Full Version : Solved: Test Date if it is Weekend or Holiday



gnod
03-31-2007, 11:25 PM
Hi,

If the Due Date falls on weekend or holiday (in Philippines), the return date should be the last working day before due date (for ex: today is Apr 1 which is sunday, the return date is march 30 which is friday)
Does anyone know how to create a formula? :help


Thanks..

Bob Phillips
04-01-2007, 03:53 AM
Here is a solution that uses the WORKDAY function which is part of the analysis toolpak.

=WORKDAY(A1+1,-1)

gnod
04-01-2007, 05:01 AM
Thanks..
but when i test for Apr 5 and Apr 6 (holiday in the philippines) the return date should be Apr 4 which is not a holiday in the philippines..

Bob Phillips
04-01-2007, 08:24 AM
Ifyou want a quality answer you have to supply all the information, you never mentioned holidays. Put the holiday dates in a list and give them a defined name of holidays then use =WORKDAY(A1+1,-1,holidays)

gnod
04-01-2007, 09:31 AM
If the Due Date falls on weekend or holiday (in Philippines)


i did mention the holiday..

gnod
04-01-2007, 09:37 AM
Thanks.. it works.. :thumb

gnod
04-01-2007, 09:46 AM
=WORKDAY(A1+1,-1,holidays)

when i test for =WORKDAY(A1,-1,holidays), it has the same result..
what is the use of adding 1 to A1? :think:

gnod
04-01-2007, 09:58 AM
just ignore my question because i know the answer
if it is weekday, it will return the same date.. :banghead:

Bob Phillips
04-01-2007, 10:07 AM
Best way of learning ... solving it yourself.