# 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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

#### 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
2
Views
53
Replies
6
Views
230
Replies
2
Views
86
Replies
3
Views
99
Replies
1
Views
340

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

1,151,561
Messages
5,765,113
Members
425,261
Latest member
JW00

### 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