date form and workbook with autofill for date

L

ll

Hi,
I'm working with a form that populates the spreadsheet with a year's
worth of dates. Now, I'm attempting to split the date fill according
to month.
My question is, is there a way to do this while still using the
autofill function or would I need to perhaps use a loop instead?

Thanks,
Louis
 
J

JNW

say the month is in B1 and the full date is in A1.
range("B1").formula = "=month(A1)"

Then use autofill down.

Is this what you were looking for?
 
L

ll

say the month is in B1 and the full date is in A1.
range("B1").formula = "=month(A1)"

Then use autofill down.

Is this what you were looking for?

Thanks for your reply. I had been using autofill, but, as I am now
trying to separate the months on the same worksheet (spaced by a set
number of blank rows), I have been trying a loop (for n=2 to
daysinyear).
It's partially working, although I am looking at a conditional
statement (below). Does anyone know what syntax might be better to
use?

If Cells(j - 1, 1).Value <> "" Or j > 10 And Cells(j - 5, 1).Value <>
"" Then


To sum up what I have - three worksheets - two of which have dates.
One of them has only dates (two columns - the first for date and the
second for day of week). The other sheet is populated by the first
sheet (in its date columns). I want to use this code to populate the
'date only' sheet (with gaps between months).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top