Formula to get a day of the year from a date

R

robin_gould_durban

Hi,

Is there a way that I can get the day of the year returned in a cell
when I enter a date in another cell. So if I enter 01/01/2005 in A1, I
would like "2" to display in cell A2. I need this number for
calculations.

Thanks.

Rob
 
P

Peo Sjoblom

I dispute that 1/1/2005 is the second day of the year

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


if you really meant 2 just add 2 instead of 1 att the end

Regards,

Peo Sjoblom
 
R

robin_gould_durban

Thanks for the solution. Sorry, my mind was thinking one thing while
my fingers were typing something else - of course it is day 1!!

Thanks again.
 
S

SirMetro

Try this (I use this formula to establish a text based 3 digit day of the
week reference)

=mid(TEXT(J2,"mmmm dd, yyyy"),6,2)

This should give you just the day.
Sir Metro
 
Top