# Calculating remaining days in a month

#### Blue Brother

##### New Member
I need to create a forumla to work out the number of days remaining in a month. If the date in cell A1 was 5/1/03, it would return 26 because there are 31 days in January. Thanks in advance for any help.

### Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

#### fairwinds

##### MrExcel MVP
Hi,

Try:

=EOMONTH(A1,0)-A1

and format cell as number.

#### Mr Robin

##### New Member
This EOMONTH function doesn't work on my machine but this formula does:

=("01/0"&MONTH(A1)+1&"/"&YEAR(A1))-A1-1

Format the cell as a number.

Robin

#### Joe4

Quote from Excel help on EOMONTH function:

If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.

The Analysis ToolPak add-in should have come with your Excel. Many times, it is already installed and just needs to be selected from the Tools | Add-Ins menu.

There are many other useful function in this add-in.

#### fairwinds

##### MrExcel MVP
EOMONTH belongs to analysis toolpack.

There is no excuse for not having that enabled.

Look in the help file for how to install and enable.

#### vagasilac

##### New Member
=(date(year(today()),month(today())+1;1)-1)-today()

##### MrExcel MVP
=(date(year(today()),month(today())+1;1)-1)-today()

Nowadays, no need for such. The fairwinds suggestion, post #2, will suffice for EOMONTH is now directly available.

#### vagasilac

##### New Member
Nowadays, no need for such. The fairwinds suggestion, post #2, will suffice for EOMONTH is now directly available.

Sorry, you're right!

Replies
3
Views
271
Replies
14
Views
260
Replies
2
Views
283
Replies
1
Views
106
Replies
5
Views
235

1,186,166
Messages
5,956,335
Members
438,247
Latest member
UZev

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back