VBA help sought

H

H.S

Dear Experts



I hope someone can assist with my request.



I have a workbook with 13 sheets. Worksheet1 is the main working sheet, the
remaining 12 sheets represent one month of the year each. (Jan05, Feb05..)



On Sheet1 I carry out all my calculations. Cell A1 is always displaying the
current date; cells F5 to F11 display the final calculations. I manually
copy the date in A1 (Sheet1) and paste it into the corresponding monthly
sheet starting in cell A3 and the final calculations from D5:D11 (Sheet1) to
the same monthly sheet filling cells

B3: B9. The next day the working sheet (Sheet1) is overwritten with new data
and the same process is carried out copying and pasting the summary to the
corresponding monthly sheet under the previous days entries leaving an empty
row between the entries. The new date is now in A11 and the final
calculations in cells B11:B17.

I am looking for a macro that would copy this data to the required monthly
sheet.

I would be grateful if one of your experts could guide me in the write
direction.



Thank you
 
B

Bob Phillips

Sub CopyData()
Dim sMonth As String
Dim iDateRow As Long
Dim iDataRow As Long

sMonth = Format(Date, "mmmyy")
iDateRow = Day(Date) * 2 + 1
iDataRow = Day(Date) * 7 - 2

With Worksheets(sMonth)
.Cells(iDateRow, "A").Value = Range("A1").Value
Range("F5:F11").Copy Destination:=.Cells(iDataRow, "D")
End With
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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