Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default Formula to get a day of the year from a date

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

  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

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

" wrote:

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


  #4   Report Post  
 
Posts: n/a
Default

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.

Peo Sjoblom wrote:
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

" wrote:

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



  #5   Report Post  
SirMetro
 
Posts: n/a
Default

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date formula Robyn Bellanger Excel Discussion (Misc queries) 2 December 16th 04 12:41 AM
Formula to determine a future date based on criteria David Excel Worksheet Functions 2 December 15th 04 07:51 PM
dynamic year to date formula snax500 Excel Worksheet Functions 5 December 13th 04 11:03 PM
Need help troubleshooting an array formula XLXP on Win2K KR Excel Worksheet Functions 1 December 13th 04 07:41 PM
How do I add a date formula to a cell but hide the contents with . Emzy Wemzy Excel Discussion (Misc queries) 2 December 12th 04 01:48 PM


All times are GMT +1. The time now is 04:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"