=SMALL(IF(WEEKDAY(DATE(YEAR(TODAY()),11,ROW(INDIRECT
("1:"&ROW(A1:A30)))))=5,DATE(YEAR(TODAY()),11,ROW(INDIRECT
("1:"&ROW(A1:A30)))),""),4)
Its supposed to find Thanksgiving date for the current
year...
Is this an elaborated solition? is there an easyer way?...
Regards
Juan
Yes, there's an easier way. Thanksgiving is always the 4th Thurdsay in
November, so it can only fall between 22-Nov and 28-Nov, inclusive.
So
=LOOKUP(2,1/(WEEKDAY(DATE(YEAR(NOW()),11,
22+{0,1,2,3,4,5,6}))=5),DATE(YEAR(NOW()),11,22+{0,1,2,3,4,5,6}))
---------
Message sent via www.excelforums.com
Thnaks
Juan
>.
>
Or this one (which is another way of saying Thursday before Nov 29):
=DATE(YEAR(TODAY()),11,29)-WEEKDAY(DATE(YEAR(TODAY()),11,24))
Regards,
Daniel M.
"hrlngrv - ExcelForums.com" <hrl...@aol-dot-com.no-spam.invalid> wrote in
message news:%23zOSFE4...@TK2MSFTNGP12.phx.gbl...
> Juan Sanchez wrote...
Svelte brute force is still brute force. Elegance is so much nicer.
I had a feeling you'd come up with something better. I'll just point out
that 24 = 29 - target WEEKDAY result.
=22+MOD(14256750,2*WEEKDAY(DATE(Year,11,22))+5)
Dana DeLouis
"hrlngrv - ExcelForums.com" <hrl...@aol-dot-com.no-spam.invalid> wrote in
message news:%23zOSFE4...@TK2MSFTNGP12.phx.gbl...
> Juan Sanchez wrote...
> ..
> =22+MOD(14256750,2*WEEKDAY(DATE(Year,11,22))+5)
Interesting. Altough I'm an active opponent to the usage to MOD(WEEKDAY())
pattern in formulas. ;-)
Also, to find the day number:
=29-WEEKDAY(DATE(aYear,11,24))
Regards,
Daniel M.
> Interesting. Altough I'm an active opponent to the usage to MOD(WEEKDAY())
> pattern in formulas. ;-)
Interesting, may I ask why?
Regards,
Sandy
--
to e-mail direct replace @mailintor.com with @tiscali.co.uk
"Daniel.M" <prenom...@bigfoot.inutil.com> wrote in message
news:OUM80lEm...@TK2MSFTNGP14.phx.gbl...
On Sat, 11 Sep 2004 23:11:42 +0100, "Sandy Mann" <sand...@mailinator.com>
wrote:
Cheers
Juan
>.
>