View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
jlclyde jlclyde is offline
external usenet poster
 
Posts: 410
Default Find Last Saturday of the Year

On Mar 17, 10:36*am, jlclyde wrote:
On Mar 17, 10:06*am, Gary''s Student





wrote:
Put the year in A1 and then:


=DATE(A1+1,1,1)-WEEKDAY(DATE(A1+1,1,1))


For example:


2006 * *Saturday, December 30, 2006
2007 * *Saturday, December 29, 2007
2008 * *Saturday, December 27, 2008
2009 * *Saturday, December 26, 2009


--
Gary''s Student - gsnu200774


"jlclyde" wrote:
I am trying to find the last Saturday of the year with excel. *There
are a few sites that I visited, but they specify weekdays and I want
saturday.


Thanks,
Jay- Hide quoted text -


- Show quoted text -


neither of the formulas work correctly. *They give a #NUM! Error. *the
problem is that the year is not called out in the date so it is trying
to use the date in A1 as the year and not use the year of the value in
A1. *So this woudl be the right formula.
=DATE(YEAR(A1)+1,1,1)-WEEKDAY(DATE(YEAR(A1)+6,1,1))

Thank you fir this help. *I woudl not have got here with out both of
your replies.
Jay- Hide quoted text -

- Show quoted text -

I was wrong with my previous post. This formula does last day of the
last Saturday of the month and that is close enough. Thanks for the
help.

=DATE(YEAR(A1),MONTH(A1)+1,0)-
(MAX(0,WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,2),1)-5))

Jay