First friday calculation

arihazra

New Member
Joined
Jun 1, 2006
Messages
2
Hi,

I tried to search but did not find any post regarding the requirements i have

a) calcuting the date of first Friday of a year, my input is year value.

b) calculating the date of 'Good friday' of a year, my input is year value.

Could anybody help.

Much appreciated for an early response

Thanks & regards
Arindam
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
a) =DATE(A1,1,1)+CHOOSE(WEEKDAY(DATE(A1,1,1),2),4,3,2,1,0,6,5) where A1 contains a year number.

b) It depends on when Easter falls. How do you intend to determine that?
 
Upvote 0
Welcome to the Board!

here is the first one

=IF(WEEKDAY(A1,1)<>6,(6-WEEKDAY(A1,1))+A1,A1)
Where A1 will have the date - the weekday requires that the Analysis Toolpak be added in. To turn it on go to Tools --> Add-in --> check the box for Analysis Toolpak.

HTH
 
Upvote 0
BTW, Easter is the first Sunday following the full moon that occurs on or next after the vernal equinox.

Excel doesn't have built-in functions for EQUINOX() or MOON(). ;)
 
Upvote 0
...the weekday requires that the Analysis Toolpak be added in. To turn it on go to Tools --> Add-in --> check the box for Analysis Toolpak.

HTH

WEEKDAY is a native Excel function.
 
Upvote 0
Pulled from Walkenbach orginally submitted by Thomas Jansen

To calculate Easter:
=DOLLAR(("4/"&A1)/7+MOD(19*MOD(A1,19)-7,30)*14%,)*7-6

Just substract 2 at the end for Good Friday:
=DOLLAR(("4/"&A1)/7+MOD(19*MOD(A1,19)-7,30)*14%,)*7-6-2

where A1 houses the year.

As Walkebach says... "Please don't ask me to explain this formula. I haven't a clue."
 
Upvote 0
Pulled from Walkenbach orginally submitted by Thomas Jansen

To calculate Easter:
=DOLLAR(("4/"&A1)/7+MOD(19*MOD(A1,19)-7,30)*14%,)*7-6

I spot checked this for a few years. Seems to work. Pretty clever.
 
Upvote 0
First Friday of the year could be done as:

=CEILING(DATE(A1,1,1)-6,7)+6

where A1 contains the year.
 
Upvote 0
Pulled from Walkenbach orginally submitted by Thomas Jansen

To calculate Easter:
=DOLLAR(("4/"&A1)/7+MOD(19*MOD(A1,19)-7,30)*14%,)*7-6

Just substract 2 at the end for Good Friday:
=DOLLAR(("4/"&A1)/7+MOD(19*MOD(A1,19)-7,30)*14%,)*7-6-2

where A1 houses the year.

As Walkebach says... "Please don't ask me to explain this formula. I haven't a clue."

Not being a Christian :wink: , could someone explain the 14% :unsure:

Gene, "The Mortgage Man", Klein
 
Upvote 0
For first Friday of the year, a formula which works whichever date system you're using......

=DATE(A1,1,8)-WEEKDAY(DATE(A1,1,2))
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,384
Members
448,956
Latest member
JPav

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top