#of days remaining to the EOM

  • Thread starter Thread starter Narnimar
  • Start date Start date
N

Narnimar

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.
 
=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
 
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
 
Assuming Jan 15 is in Cell A1 this formula should do it...

=DATE(YEAR(A1), MONTH(A1)+1, 0)-A1
 
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.
 
Back
Top