smilelover
New Member
- Joined
- Jul 24, 2011
- Messages
- 32
Now I have done most of my work,
what I need is a way to multiple a same data for 8 times
for eg, Let E1=E2=E3=E4=E5=E6=E7=E8
then E9=E10=E11=E12=E13=E14=E15=E16
i have created the list E1, E9, E17 etc...
Since I am dealing with multiple sheets, my data usually sync with the changes with the other sheet, however, they only sync with the changes of EXISTING data, not new data. Help?
My Current Code:
And yeah, if you find a pattern on my code and think that it can be simplified, tell me!!
what I need is a way to multiple a same data for 8 times
for eg, Let E1=E2=E3=E4=E5=E6=E7=E8
then E9=E10=E11=E12=E13=E14=E15=E16
i have created the list E1, E9, E17 etc...
Since I am dealing with multiple sheets, my data usually sync with the changes with the other sheet, however, they only sync with the changes of EXISTING data, not new data. Help?
My Current Code:
Code:
Private Sub Workbook_Open()
Dim rowA As Long
For rowA = 1 To WorksheetFunction.CountA(Range("Sheet1!A:A"))
Range("=Sheet4!A" & rowA * 8 - 5).Formula = ("=Sheet1!A" & rowA)
Range("=Sheet4!J" & rowA * 8 - 5).Formula = ("=Sheet1!B" & rowA)
Range("=Sheet4!K" & rowA * 8 - 5).Formula = ("=Sheet1!C" & rowA)
Range("=Sheet4!L" & rowA * 8 - 5).Formula = ("=Sheet1!D" & rowA)
Next rowA
End Sub
Private Sub Workbook_Activate()
Dim rowB As Long
For rowB = 1 To WorksheetFunction.CountA(Range("Sheet1!A:A"))
Range("=Sheet4!B" & rowB * 8 - 5).Formula = ("=Sheet2!A1")
Range("=Sheet4!C" & rowB * 8 - 4).Formula = ("=Sheet2!B2")
Range("=Sheet4!D" & rowB * 8 - 3).Formula = ("=Sheet2!C3")
Range("=Sheet4!E" & rowB * 8 - 2).Formula = ("=Sheet2!D4")
Range("=Sheet4!F" & rowB * 8 - 1).Formula = ("=Sheet2!E5")
Range("=Sheet4!G" & rowB * 8 - 0).Formula = ("=Sheet2!F6")
Range("=Sheet4!H" & rowB * 8 + 1).Formula = ("=Sheet2!G7")
Range("=Sheet4!I" & rowB * 8 + 2).Formula = ("=Sheet2!H8")
Next rowB
End Sub
And yeah, if you find a pattern on my code and think that it can be simplified, tell me!!