![]() |
VBA help sought
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 |
VBA help sought
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) "H.S" wrote in message ... 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 |
All times are GMT +1. The time now is 09:21 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com