Solved

Third Thursday of each month (use previous workday)

Posted on 2012-12-26
7
337 Views
Last Modified: 2012-12-27
Hello,

I am asking a follow up of :
http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_27977825.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
0
Comment
Question by:pdvsa
  • 4
  • 3
7 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
Comment Utility
If you have the first date in A1 this formula will give 3rd Thursday for following month

=EOMONTH(A1,0)+22-WEEKDAY(EOMONTH(A1,0)+3)

to give the previous workday if that's a holiday change to

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

where holidays are shown in the range Holidays!$H$2:$H$10

...so if the 3rd Thursday is a holiday that will give you the day before (unless that's a holiday too.....)

regards, barry
workdays2.xlsx
0
 

Author Comment

by:pdvsa
Comment Utility
Barry,   Will test when get back to computer...

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
0
 
LVL 50

Expert Comment

by:barry houdini
Comment Utility
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
0
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

 

Author Closing Comment

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

Author Comment

by:pdvsa
Comment Utility
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.
0
 

Author Comment

by:pdvsa
Comment Utility
nevermind...it is not the formula...
0
 
LVL 50

Expert Comment

by:barry houdini
Comment Utility
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
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
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…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

772 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

14 Experts available now in Live!

Get 1:1 Help Now