pdvsa

asked on

# Third Thursday of each month (use previous workday)

Hello,

I am asking a follow up of :

https://www.experts-exchange.com/questions/27977825/Holidays-use-previous-work-date.html

In that question, I have an answer to exclude holidays.

I now need to use the 3rd thursday of each month but if that 3rd thursday is a holiday from the excel tab named "Holiday" then use the preceding workday.

thank you

I think I basically need to combine these two formulae somehow:

this accounts for the holidays:

=WORKDAY(D1,1,Holidays!$H2:$H10)

this finds the third thursday of the month:

=CEILING(EOMONTH(A1,0)+1-DAY(EOMONTH(A1,0)+1)+1-5,7)+19

see attached file

workdayswithHolidays.xlsx

I am asking a follow up of :

https://www.experts-exchange.com/questions/27977825/Holidays-use-previous-work-date.html

In that question, I have an answer to exclude holidays.

I now need to use the 3rd thursday of each month but if that 3rd thursday is a holiday from the excel tab named "Holiday" then use the preceding workday.

thank you

I think I basically need to combine these two formulae somehow:

this accounts for the holidays:

=WORKDAY(D1,1,Holidays!$H2

this finds the third thursday of the month:

=CEILING(EOMONTH(A1,0)+1-D

see attached file

workdayswithHolidays.xlsx

ASKER CERTIFIED SOLUTION

membership

This solution is only available to members.

To access this solution, you must be a member of Experts Exchange.

I'm not really sure what you are asking there. The formula will work even if the holiday range is empty, so if you want a formula that will work with or without holidays you could simply use the last (longer) formula and just add holidays when you want.

regards, barry

regards, barry

ASKER

that worked perfectly. Thanks. As far as my other question, no need in trying to explain by text. Its not important. thanks though....

ASKER

Berry: not sure if you are monitoring.

There would not be any issue in using the formula in 2007 excel? I am not certain of the source but I have 2 guesses: it might have something to do with the formula.

=WORKDAY(EOMONTH(A1,0)+23-WEEKDAY(EOMONTH(A1,0)+3),-1,Holidays!$H$2:$H$10)

or a separate tab I copied over from another file. The data is linked.

If you dont believe it is the formula then I think it must be the other tab I imported with the links.

thanks.

There would not be any issue in using the formula in 2007 excel? I am not certain of the source but I have 2 guesses: it might have something to do with the formula.

=WORKDAY(EOMONTH(A1,0)+23-

or a separate tab I copied over from another file. The data is linked.

If you dont believe it is the formula then I think it must be the other tab I imported with the links.

thanks.

ASKER

nevermind...it is not the formula...

No - all those functions are standard in Excel 2007 - clearly A1 needs to be a date, as long as that is the case then the formula should work OK......

regards, barry

regards, barry

ASKER

On other question, would it be advisable to make this applicable in any workbook? Meaning if i dragged right in a wb then the dates would adjust accordingly? I wonder if there would be a conflict when i did not want to take into account the holidays on the Holidays tab and to set equal to the 3rd thursday of month. Wanted to hear what an expert would say... Thank you