Date formula

pujo

Well-known Member
Joined
Feb 19, 2009
Messages
710
Office Version
  1. 2019
  2. 2013
Platform
  1. Windows
I'm looking for a way to generate dates from the first of the previous month, to the first of the current month in a column.
This formula will create the dates of the previous month ending on the last day of that month however, I need it to end on the first of the current month.
Excel Formula:
=EOMONTH(TODAY(),-2)+ROW(INDIRECT("1:"&DAY(EOMONTH(TODAY(),1))))

Can't seem to figure it out.

Thanks!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
How about
Excel Formula:
=EOMONTH(TODAY(),-2)+ROW(INDIRECT("1:"&DAY(EOMONTH(TODAY(),1))+1))
What version of Excel are you using this in?
 
Upvote 0
Solution
=EOMONTH(TODAY(),-2)+ROW(INDIRECT("1:"&1+DAY(EOMONTH(TODAY(),-1))))
 
Upvote 0
How about
Excel Formula:
=EOMONTH(TODAY(),-2)+ROW(INDIRECT("1:"&DAY(EOMONTH(TODAY(),1))+1))
What version of Excel are you using this in?
(O365) As soon as I posted the question, I figured it out.
Excel Formula:
=EOMONTH(TODAY(),-2)+TIME(7,0,0)+ROW(INDIRECT("1:"&DAY(EOMONTH(TODAY(),2))+1))
I've also added a time stamp to each date.

Thanks!
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,154
Members
453,021
Latest member
Justyna P

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top