ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   #of days remaining to the EOM (https://www.excelbanter.com/excel-discussion-misc-queries/202560-days-remaining-eom.html)

Narnimar

#of days remaining to the EOM
 
I need a formula to return no of days to that month for a given date in the
cell. If I enter 15-Jan 2009 in cell A1 the formula should return the no of
days remaining in that month in A2.
Appriiate anyone help me in this.

Bob Umlas[_2_]

#of days remaining to the EOM
 
=date(year(A1),Month(A1)+1,1)-A1
re-formatted as General

"Narnimar" wrote in message
...
I need a formula to return no of days to that month for a given date in the
cell. If I enter 15-Jan 2009 in cell A1 the formula should return the no
of
days remaining in that month in A2.
Appriiate anyone help me in this.




Peo Sjoblom[_2_]

#of days remaining to the EOM
 
=DATE(YEAR(A1),MONTH(A1)+1,0)-A1


then you need to change the format to general since that formula will trick
Excel into a date format

--


Regards,


Peo Sjoblom

"Narnimar" wrote in message
...
I need a formula to return no of days to that month for a given date in the
cell. If I enter 15-Jan 2009 in cell A1 the formula should return the no
of
days remaining in that month in A2.
Appriiate anyone help me in this.




Duke Carey

#of days remaining to the EOM
 
Make sure you have the Analysis toolpak installed (tools-add-ins and check
analysis toolpak)

The formula you want is

=EOMONTH(A1,0)-A1+1

"Narnimar" wrote:

I need a formula to return no of days to that month for a given date in the
cell. If I enter 15-Jan 2009 in cell A1 the formula should return the no of
days remaining in that month in A2.
Appriiate anyone help me in this.


Jim Thomlinson

#of days remaining to the EOM
 
Assuming Jan 15 is in Cell A1 this formula should do it...

=DATE(YEAR(A1), MONTH(A1)+1, 0)-A1
--
HTH...

Jim Thomlinson


"Narnimar" wrote:

I need a formula to return no of days to that month for a given date in the
cell. If I enter 15-Jan 2009 in cell A1 the formula should return the no of
days remaining in that month in A2.
Appriiate anyone help me in this.


Jim Thomlinson

#of days remaining to the EOM
 
This formula give you 15 - through 31st inclusive so the answer is 17. If you
did not want to caount the 15th then you would go with mine and Peo's or my
solutions of

=date(year(A1),Month(A1)+1,0)-A1

Which gives you 16.
--
HTH...

Jim Thomlinson


"Bob Umlas" wrote:

=date(year(A1),Month(A1)+1,1)-A1
re-formatted as General

"Narnimar" wrote in message
...
I need a formula to return no of days to that month for a given date in the
cell. If I enter 15-Jan 2009 in cell A1 the formula should return the no
of
days remaining in that month in A2.
Appriiate anyone help me in this.






All times are GMT +1. The time now is 12:18 PM.

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