M
MDC
I need to copy different ranges of data to different
Worksheets. The data will always be in ranges C1:I?, the
next range will be J1:I?, so on. The # of ranges to copy
varies. Cell B2 shows how many ranges must be copied.
Here's what i have so far.
Dim lngLastRow As String
Dim shtActive As Worksheet
Dim myStartColumn, myEndColumn As String
lngLastRow = myDataSheet.UsedRange.Rows.Count
myStartColumn = 3
myEndColumn = myStartColumn + 7
For i = 1 To Range("b2").Value
Range("R[1]C[" & myStartColumn & "]:R[" & lngLastRow & "]C
[" & myEndColumn & "]").Select
Selection.Copy
Sheets("Item" & i & "").Select
Range("C1").Select
ActiveSheet.Paste
I'm gettin a :Run time error '1004' : Method 'Range' of
object'_Global'failed" error.
Please help.
Worksheets. The data will always be in ranges C1:I?, the
next range will be J1:I?, so on. The # of ranges to copy
varies. Cell B2 shows how many ranges must be copied.
Here's what i have so far.
Dim lngLastRow As String
Dim shtActive As Worksheet
Dim myStartColumn, myEndColumn As String
lngLastRow = myDataSheet.UsedRange.Rows.Count
myStartColumn = 3
myEndColumn = myStartColumn + 7
For i = 1 To Range("b2").Value
Range("R[1]C[" & myStartColumn & "]:R[" & lngLastRow & "]C
[" & myEndColumn & "]").Select
Selection.Copy
Sheets("Item" & i & "").Select
Range("C1").Select
ActiveSheet.Paste
I'm gettin a :Run time error '1004' : Method 'Range' of
object'_Global'failed" error.
Please help.