Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 159
Default How do I convert a month-date format to day number of the year?

I have a list of dates in the format Mar-15. I want to convert these to the
day number of the year. In a non-leap year, Mar-15 would be 74 (the 74th day
of the year) and Dec-31 would be 365. Have not yet found a way to do this in
Excel.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default How do I convert a month-date format to day number of the year?

Here are a couple ideas....

If all of the dates are from the same year
(assuming 2007)
AND
you want to convert them to the day-of-the-year

Then....
Change the number format of the dates to one of the regular number formats
Put 12/31/2006 in a blank cell
Copy that cell
Select the dates
<edit<paste special
Check: Subtract
Click [OK]

OR....if you want a formula to return the day-of-the-year

With A1: (a date)
B1: =A1-DATE(YEAR(A1),1,0)
(formatted as a regular number)

I can't think of a number format that would return the day-of-the-year,
though.

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Larry" wrote:

I have a list of dates in the format Mar-15. I want to convert these to the
day number of the year. In a non-leap year, Mar-15 would be 74 (the 74th day
of the year) and Dec-31 would be 365. Have not yet found a way to do this in
Excel.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 159
Default How do I convert a month-date format to day number of the year

Ron,

I tried your second method (the first wasn't quite clear to me), and it
worked perfectly. Molto grazie!

"Ron Coderre" wrote:

Here are a couple ideas....

If all of the dates are from the same year
(assuming 2007)
AND
you want to convert them to the day-of-the-year

Then....
Change the number format of the dates to one of the regular number formats
Put 12/31/2006 in a blank cell
Copy that cell
Select the dates
<edit<paste special
Check: Subtract
Click [OK]

OR....if you want a formula to return the day-of-the-year

With A1: (a date)
B1: =A1-DATE(YEAR(A1),1,0)
(formatted as a regular number)

I can't think of a number format that would return the day-of-the-year,
though.

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Larry" wrote:

I have a list of dates in the format Mar-15. I want to convert these to the
day number of the year. In a non-leap year, Mar-15 would be 74 (the 74th day
of the year) and Dec-31 would be 365. Have not yet found a way to do this in
Excel.

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
Help: How do I convert a text date into a real date format japorms Excel Worksheet Functions 4 August 2nd 06 06:36 PM
pick up date, month and year from a date vikkam Excel Discussion (Misc queries) 4 July 27th 06 04:27 AM
convert number to date format Lesley Excel Discussion (Misc queries) 4 July 12th 06 09:17 PM
holiday dates bucci Excel Worksheet Functions 4 June 15th 06 09:35 AM
Excel: I enter date and format for date, but shows as number spohar Excel Discussion (Misc queries) 2 March 10th 06 08:40 PM


All times are GMT +1. The time now is 08:18 AM.

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"