View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Finding the date of the previous Thanksgiving Day

Ron,

Thanks for your help! It appears that your solution is a variation of the
one given by Teethless mama, except that it can work with a target date
located in any cell.

Thanks again,
Bob


"Ron Rosenfeld" wrote:

On Mon, 28 Sep 2009 18:56:07 -0700, Bob wrote:

Given any date, I need to find the date of the previous Thanksgiving Day.

For example, if the date in cell A1 is 9/28/2009, then the date of the
previous Thanksgiving Day in cell B1 would be 11/27/2008. However, if the
date in cell A1 is 12/5/2009, then the date of the previous Thanksgiving Day
in cell B1 would obviously be 11/26/2009.

I know how to find the date of the current years Thanksgiving Day using
=FLOOR(DATE(YEAR(TODAY()),11,29),7)-2. But finding the previous Thanksgiving
Day has been elusive.

Any help would be greatly appreciated.

Thanks,
Bob



=IF(A1DATE(YEAR(A1),11,29)-WEEKDAY(DATE(YEAR(A1),11,3)),
DATE(YEAR(A1),11,29)-WEEKDAY(DATE(YEAR(A1),11,3)),
DATE(YEAR(A1)-1,11,29)-WEEKDAY(DATE(YEAR(A1)-1,11,3)))

--ron