ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Addition of Days (https://www.excelbanter.com/excel-discussion-misc-queries/217997-addition-days.html)

Ricky

Addition of Days
 
I've have a formula that calculates, from a date entry, the number of
days elapsed in that month. E.g. An entry of "20/12/09" will return "20"

With this NG's assistance, I achieve this with =R6-DATE(MONTH(R6),1,0)
in cell T6.

Q. How do I convert the result in T6 to a numeric. I want to add the
days remaining in the month (in cell T6) to a number elsewhere?

At the moment I'm adding a date serial number to a numeric giving a
stupid result.

Tks - Ricky

Bob Phillips[_3_]

Addition of Days
 
Use this instead

=DAY(R6)

and format as general

--
__________________________________
HTH

Bob

"Ricky" wrote in message
...
I've have a formula that calculates, from a date entry, the number of days
elapsed in that month. E.g. An entry of "20/12/09" will return "20"

With this NG's assistance, I achieve this with =R6-DATE(MONTH(R6),1,0) in
cell T6.

Q. How do I convert the result in T6 to a numeric. I want to add the days
remaining in the month (in cell T6) to a number elsewhere?

At the moment I'm adding a date serial number to a numeric giving a stupid
result.

Tks - Ricky




Ricky

Addition of Days
 
Great! Thanks Bob.

Ricky

Bob Phillips wrote:
Use this instead

=DAY(R6)

and format as general


David Biddulph[_2_]

Addition of Days
 
Date serial numbers are numeric, so you can add one to the other, but I
think you must have misread the advice given on this NG.
Your formula would give 20/12/1997, or 35784 as a number, as your DATE
function is giving 12 years (the value of MONTH(R6) in the year field of the
DATE function) as the amount to subtract.

The formula you would need is =R6-DATE(YEAR(R6),MONTH(R6),0)
If you format that as General or Number it will show 20.

The DAY() suggestion in another reply is of course easier.
--
David Biddulph

"Ricky" wrote in message
...
I've have a formula that calculates, from a date entry, the number of days
elapsed in that month. E.g. An entry of "20/12/09" will return "20"

With this NG's assistance, I achieve this with =R6-DATE(MONTH(R6),1,0) in
cell T6.

Q. How do I convert the result in T6 to a numeric. I want to add the days
remaining in the month (in cell T6) to a number elsewhere?

At the moment I'm adding a date serial number to a numeric giving a stupid
result.

Tks - Ricky





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

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