dates to end of month

C

Calculator

I am looking for a formula that calculates the number of (working) days between today and the end of the current month
 
I

Ivar Svendsen

Hello

This VBA code will return the number of days remaining, not including today

Day = DatePart("d", Date()
FirstInMonth = DateAdd("d", 1-Day, Date()
NextMonth = DateAdd("m", 1, FirstInMonth
DaysLeft = DateDiff("d", Date(), NextMonth) -

It is also possible to write this in one big line

DateDiff("d", Date(), DateAdd("m", 1, DateAdd("d", 1-DatePart("d", Date()), Date()))) - 1
 
Top