Formula for converting xx/xx/xxxx dates to a number between 1 and

R

Rodney Reed

I need an Excel formula to convert a date (mm/dd/yyyy) to a serial number,
i.e. January 1st = 001, 1st February = 032, 31st and so on to December 31st =
365 . The serial number needs to reset to 001 on Jan 1st of each new year.

Is there a quick way to convert any given date from any given year to this
3-digit day number?

Thanks in advance,
Rodney
 
J

Jacob Skaria

If the date is in excel date format try the below formula with a date in cell
A1

'as text
=TEXT(A1-DATE(YEAR(A1),1,1)+1,"000")

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

If this post helps click Yes
 
R

Rick Rothstein

You can save a mathematical operation like this...

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

Note to OP... you will probably have to format the cells as General.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top