ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Dates Subtracting dates. (https://www.excelbanter.com/excel-discussion-misc-queries/2079-dates-subtracting-dates.html)

help me

Dates Subtracting dates.
 
first of all I would like to have one row with any date in it (formated for a
regular date) example 12/15/04, in the next cell I would like to have
computed the number of the day in the year example 01/10/03 is the 10th day
of the year so that cell would have a 10 in it.

another example is to day 12/15/04 which is day 350.

John Mansfield

In cell A1 add the date 12/31/2004. In cell B1 add the date 01/01/2004. In
cell C1 add the formula "=A1-B1". Change the format in cell C1 to "Number"
(go to the standard toolbar and hit Format - Cells - Number with decimal
places equal to zero).

----
Regards,
John Mansfield
http://www.pdbook.com

"help me" wrote:

first of all I would like to have one row with any date in it (formated for a
regular date) example 12/15/04, in the next cell I would like to have
computed the number of the day in the year example 01/10/03 is the 10th day
of the year so that cell would have a 10 in it.

another example is to day 12/15/04 which is day 350.


Ron Rosenfeld

On Thu, 16 Dec 2004 16:11:01 -0800, "help me"
wrote:

first of all I would like to have one row with any date in it (formated for a
regular date) example 12/15/04, in the next cell I would like to have
computed the number of the day in the year example 01/10/03 is the 10th day
of the year so that cell would have a 10 in it.

another example is to day 12/15/04 which is day 350.



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

Format as Number with 0 decimal places.


--ron

help me

THANK YOU THIS IS EXACTLY WHAT I WAS LOOKING FOR.

"Ron Rosenfeld" wrote:

On Thu, 16 Dec 2004 16:11:01 -0800, "help me"
wrote:

first of all I would like to have one row with any date in it (formated for a
regular date) example 12/15/04, in the next cell I would like to have
computed the number of the day in the year example 01/10/03 is the 10th day
of the year so that cell would have a 10 in it.

another example is to day 12/15/04 which is day 350.



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

Format as Number with 0 decimal places.


--ron


Ron Rosenfeld

On Thu, 16 Dec 2004 19:17:05 -0800, "help me"
wrote:

THANK YOU THIS IS EXACTLY WHAT I WAS LOOKING FOR.


You're welcome. Thanks for the feedback.


--ron


All times are GMT +1. The time now is 08:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com