Thread
:
Range of Days in a month
View Single Post
#
2
Posted to microsoft.public.excel.programming
Ron Rosenfeld
external usenet poster
Posts: 5,651
Range of Days in a month
On Mon, 25 Jun 2007 19:15:46 -0700,
wrote:
I am trying to list the dates in the current month (from the 1st to
the 28th, or 29th, or 30th, or 31st, depending on the month), in a
range of cells, one day per cell.
Is it me, or are the date functions in excel way too complicated?
I've experimented with the Now() and Today() functions, with no luck.
Can someone give me an idea on how to do this?
I'd prefer not to use a macro, because it is not something i want to
have to manually start every time I open the spreadsheet.
Any clues would be greatly appreciated.
Thanks.
Here's one possible way:
A1: =DATE(YEAR(TODAY()),MONTH(TODAY()),1)
A2: =IF(MONTH($A$1+ROWS($1:1))=MONTH($A$1),$A$1+ROWS($ 1:1),"")
Fill down to A31
--ron
Reply With Quote
Ron Rosenfeld
View Public Profile
Find all posts by Ron Rosenfeld