Solved

formula for 3rd thursday of each month

Posted on 2012-12-20
15
381 Views
Last Modified: 2012-12-21
Hello...need some help with the3rd thursday of each month but if data falls on weekend then use preceding weekday.

thank you
0
Comment
Question by:pdvsa
  • 8
  • 2
  • 2
  • +2
15 Comments
 
LVL 28

Expert Comment

by:Bill Bach
ID: 38711386
Can you tell me when the third Thursday of a month falls on a weekend?
0
 

Author Comment

by:pdvsa
ID: 38711427
Bill,  I dont understand your question.
0
 

Author Comment

by:pdvsa
ID: 38711434
or if that is too complex just let me know the 3rd thursday of each month.  I have to carry th eformula over many years.
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 28

Expert Comment

by:Bill Bach
ID: 38711452
Try something like this:
=IF(DATE($A$1,ROW(A1),1)-WEEKDAY(DATE($A$1,ROW(A1),1),1)+5

A1 should be the year.
0
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst earned 500 total points
ID: 38711463
Hello,

this will give you the third Thursday of the month of any given date in A1

=DATE(YEAR(A1),MONTH(A1),1)+(5-WEEKDAY(DATE(YEAR(A1),MONTH(A1),1))+14)

The confusing bit in your question is:

" 3rd thursday of each month but if data falls on weekend"

A Thursday will never fall on a weekend. So what is the problem?

cheers, teylyn
0
 

Author Comment

by:pdvsa
ID: 38711471
how can I just reference the cell next to it?  I mean just add 1 month and make it a 3 rd thursday?   You mentioned A1 and the year is in the cell next to it.

hope I make sense.

Thursday, March 21, 2013      Thursday, April 25, 2013
                                                     make this one the formula...
0
 

Author Closing Comment

by:pdvsa
ID: 38711488
oh I see now...duh.  I was thinking too much into it.
0
 

Author Comment

by:pdvsa
ID: 38711504
OK it doesnt seem to change correctly. Dont know how to explain/  It keeps repeating the same dmy....let me know thank you.

Thursday, March 14, 2013      Thursday, March 14, 2013      Thursday, March 14, 2013
0
 

Author Comment

by:pdvsa
ID: 38711508
this is the formulat I am using:
=DATE(YEAR(N32),MONTH(N32),1)+(5-WEEKDAY(DATE(YEAR(N32),MONTH(N32),1))+14)

In N32 it shows:  Thursday, March 14, 2013
0
 

Author Comment

by:pdvsa
ID: 38711515
I am dragging the formula over many columns...
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 38711577
The 3rd Thursday of April 2013 is the 18th and not the 25th. This formula gives you that result based on what is in A1

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

Author Comment

by:pdvsa
ID: 38711663
Martin:  that worked perfectly.  My gosh that looks complicated.  Thank you.  I think I will ask to reopen question and award points to you.  

let me know if there are any objections...
0
 
LVL 50

Expert Comment

by:Ingeborg Hawighorst
ID: 38711675
My suggested formula calculates correctly, for e.g. it shows 18-April-2013.

I don't know your data structure and how you want to drag the formula. If you want to drag it across, then you will need a date in each column. Or, if you want the formula to increase by one month if you drag it across, then it might be a good idea to actually mention that requirement in your question.

A1 has the start date.

B1 has this formula, which calculates the third Thursday of the month in A1

=DATE(YEAR(A1),MONTH(A1),1)+(5-WEEKDAY(DATE(YEAR(A1),MONTH(A1),1))+14)

C1 has this formula, which increments one month from the formula to the left. Drag C1 to the right.

=DATE(YEAR(AN1),MONTH(AN1)+1,1)+(5-WEEKDAY(DATE(YEAR(AN1),MONTH(AN1)+1,1))+14)

cheers, teylyn
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 38711689
When I posted I didn't notice that the question was already answered so I don't mind if you don't reopen it.
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 38713538
>=DATE(YEAR(A1),MONTH(A1),1)+(5-WEEKDAY(DATE(YEAR(A1),MONTH(A1),1))+14)

This doesn't always give 3rd Thursday, e.g. if A1 is today it gives 13th December, which is the 2nd Thursday this month, I'd use this version

=A1-DAY(A1)+22-WEEKDAY(A1-DAY(A1)+3)

If you put that formula in A2 then you can put this formula in A3 copied down (or B2 copied across) for subsequent 3rd Thursdays, see attached

=A2+28+7*(DAY(A2+28)<15)

regards, barry
Thursdays.xls
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Dropbox in Windows Server 2008 4 26
Delete all empty columns using VBA 7 36
Excel format formula for currency 15 22
Excel VBA 4 26
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…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 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