|
Junior Member
|
|
Location: ISRAEL
Posts: 2
|
|
Quote:
Originally Posted by Ron Rosenfeld
On Sun, 30 Mar 2008 12:04:43 +0100, "Dale" wrote:
This is probably a very basic question so I apologise first, how would I
calculate the last sunday of a given month? Once I have that date, I need
the following Friday......
Thanks
If you have Excel 2007, or in an earlier version, if you have the Analysis
ToolPak installed, with any date in A1,you can use:
Sunday
=EOMONTH(A1,0)+1-WEEKDAY(EOMONTH(A1,0))
For the following Friday, merely add 5 to the above
=EOMONTH(A1,0)+6-WEEKDAY(EOMONTH(A1,0))
If you get a #NAME error, check HELP for EOMONTH and it will tell you what to
do.
--ron
|
Sorry for the "delay".
The following formula seens to be the shortest:
=INT((EOMONTH(A1,0)-1)/7)*7+1-2
Michael Avidan
“Microsoft®” MVP – Excel
ISRAEL
|