# Days past todays date

#### djaldente

##### New Member
Hi,

I make 2 payruns per month, one on the 15th and one on the 30th.

I have the date the invoice was received in one column.

I would like to make a days overdue column based on todays date and the date of the corresponding payrun.

For example an invoice received on 12th March would be due 15th April & an invoice received on the 17th March would be due 30th April. So if todays date was 5th May the invoice would be 5 days overdue.

### Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

#### etaf

##### Well-known Member
does this work for you
=IF(DAY(A2)<=15,TODAY()-DATE(YEAR(A2),MONTH(A2),DAY(15)),TODAY()-DATE(YEAR(A2),MONTH(A2),DAY(30)))
BUT invoices on the 31st of a month , I assume would be calculated from the 15th - is that so
in which case we need to add an OR to the test and add an extra month so its 15th of the next month - is that the case ?
And for FEB whoch is 28/29th what happens then

#### djaldente

##### New Member
does this work for you
=IF(DAY(A2)<=15,TODAY()-DATE(YEAR(A2),MONTH(A2),DAY(15)),TODAY()-DATE(YEAR(A2),MONTH(A2),DAY(30)))
BUT invoices on the 31st of a month , I assume would be calculated from the 15th - is that so
in which case we need to add an OR to the test and add an extra month so its 15th of the next month - is that the case ?
And for FEB whoch is 28/29th what happens then
Thanks for getting back to me mate, I managed to figure it out

you are welcome

Replies
3
Views
193
Replies
5
Views
89
Replies
5
Views
199
Replies
3
Views
183
Replies
7
Views
716

### Forum statistics

1,127,405
Messages
5,624,574
Members
416,036
Latest member
eloisa manzanarez

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