Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I copy big ranges of cells without drag or copy/paste? | Excel Discussion (Misc queries) | |||
how do i "link" two sets of named ranges | Excel Discussion (Misc queries) | |||
how copy formula that contains ranges so ranges do not overlap | Excel Worksheet Functions | |||
Excel graph 3 sets of data. 2 sets as lines 1 as column? | Charts and Charting in Excel | |||
countif with two sets of non consectutive ranges at the same time | Excel Worksheet Functions |