View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
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.