Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automate infil of data into a cell on subsequent worksheets. (Again)
I was given the code below,which puts the value from Column A into
subsequent worksheets working down the column. Value from A1 goes into Worksheet2, A2 goes into Worksheet 3..etc... How do I change the code such that the source data is in the range C2 downwards. I.E. What in the code defines the first source of the data? [I'm guessing it's in this bit Cells(sh.Index - 1, 1). ] SS Sub AAAAA() Dim sh As Worksheet For Each sh In Sheets If sh.Index < 1 Then sh.Range("Cell number you want the data on in each sheet goes in here").Value = _ Sheets(1).Cells(sh.Index - 1, 1).Value End If Next End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automate infil of data into a cell on subsequent worksheets. (Again)
Simon,
Try changing Sheets(1).Cells(sh.Index - 1, 1).Value to Sheets(1).Cells(sh.Index, 3).Value HTH, Bernie MS Excel MVP "simon" wrote in message ... I was given the code below,which puts the value from Column A into subsequent worksheets working down the column. Value from A1 goes into Worksheet2, A2 goes into Worksheet 3..etc... How do I change the code such that the source data is in the range C2 downwards. I.E. What in the code defines the first source of the data? [I'm guessing it's in this bit Cells(sh.Index - 1, 1). ] SS Sub AAAAA() Dim sh As Worksheet For Each sh In Sheets If sh.Index < 1 Then sh.Range("Cell number you want the data on in each sheet goes in here").Value = _ Sheets(1).Cells(sh.Index - 1, 1).Value End If Next End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
data links on subsequent worksheets | Excel Worksheet Functions | |||
How can I copy filtered data to subsequent worksheets? | Excel Discussion (Misc queries) | |||
How i have #10 in cell when previous#5 and subsequent #15 | New Users to Excel | |||
Automate infil of data into a cell on subsequent worksheets. | Excel Programming | |||
Automate a macros when data in a cell changes (e.g.when using quer | Excel Discussion (Misc queries) |