Days in Months

  • Thread starter Thread starter Geoff
  • Start date Start date
G

Geoff

What is a qucik way in Excel to get the days in a month over 10 years, or
through VBA?

Thanks in advance
 
What is "get the days in a month over 10 years" ? Please explain.

Best wishes Harald
 
What is a qucik way in Excel to get the days in a month over 10 years, or
through VBA?

Thanks in advance

Lots of different ways depending on what you really want to do.

The general formula, with some date in A1, is:

=32-DAY(A1-DAY(A1)+32)


If you just want a list of the days in the month, you can use the formula in
Row 1 of some column, then copy/drag it down to row 120:

=32-DAY(StartDate+DATE(YEAR(StartDate),
MONTH(StartDate)+ROW()-1,DAY(StartDate))-
DAY(StartDate+DATE(YEAR(StartDate),
MONTH(StartDate)+ROW()-1,DAY(StartDate)))+32)

If you want to list the month/year as well as the number of days, then:

A1: StartDate
B1: =32-DAY(A1-DAY(A1)+32)

A2: =EDATE(A1,1)
B2: =32-DAY(A2-DAY(A2)+32)

Select A2 and Format/Cells/Number/Custom Type: mmm yyyy
Select B2 and Format/Cells/Number/General

Select A2:B2 and copy/drag down to row 120



--ron
 
And the BetaGroups or whatever they call them, formerly Google Groups
are getting darn near impossible to work with. But the answer once
you find the answer hidden within their messed up stuff -- is a simple
answer (filling down from a date) -- hope it was what the poster meant.
 
David said:
And the BetaGroups or whatever they call them, formerly Google Groups
are getting darn near impossible to work with. But the answer once
you find the answer hidden within their messed up stuff -- is a simple
answer (filling down from a date) -- hope it was what the poster
meant.

I e-mailed Google about what they are doing to the archives and got
this reply:


"Thank you for your note about Google Groups Beta. We're putting most
of our energy into improving Google Groups Beta. For a quick answer or
to contact the Google Groups Beta support team, check out our Help
Center at http://groups-beta.google.com/support

We've also created a Google Groups Beta discussion forum on Google
Groups: http://groups-beta.google.com/group/google-labs-groups2. We
encourage you to post questions and join other Google Groups Beta users
in sharing your thoughts and expertise."


We can only live in hope

Regards

Sandy

We appreciate your support as we work to improve Google and Google
Groups Beta.
 
mmmm.........

I had previously asked Google if my true e-mail address would be shown in
the NG's when posting via Google, (I was replying to a question in the
orphaned .worksheetfunctions NG at the time). They said that they munged
the address making it Sandy......@ etc which they did not that occasion.
However, I see that this promise has been another victim of * most of our
energy into improving Google Groups*

Oh dear! I guess my work can look forward to receiving quite a few virus
emails any day now.

Sandy

[Who used to be employed by Capability Scotland? :-)]
 
Back
Top