Days remaining in the month

R

Ricky

Can anyone suggest how I can have the number of days remaining in the
month, from a date entered in A1, displayed as a numeric, ie:

Cell A1 has "20/01/09"

I would like a formula to return the number of days remaining in the
month, in this case "11" days (31 less 20).

Thanks - Ricky
 
P

Pete_UK

Try this:

=DATE(YEAR(A1),MONTH(A1)+1,1)-A1-1

if you don't want to include the date in A1 as being part of the
range. You can omit the -1 from the end if your dates are inclusive.

Hope this helps.

Pete
 
C

Chip Pearson

With the date in cell A1, the following formula will return the number
of days remaining in the month. It makes use of the fact that the 0th
day of one month is the last day of the previous month.

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

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
T

T. Valko

Another one.

If you're using a version of Excel prior to Excel 2007 this needs the
Analysis ToolPak add-in installed.

=EOMONTH(A1,0)-A1

Format as General or Number
 
Top