Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi:
My problem, on sheet 1 I have 6 defined named ranges range1,range2 etc. I would like to copy them to sheet 2 starting at row 2 what would be the most efficient way to do this. thanks Bart. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you can use something like
Sub test() Dim RangeNames As Variant Dim RangeIndex As Long Dim LastRow As Long Const ShName1 = "Sheet1" Const ShName2 = "Sheet2" RangeNames = Array("Range1", "Range2", "Range3") LastRow = 1 For RangeIndex = LBound(RangeNames) To UBound(RangeNames) Worksheets(ShName1).Range(RangeNames(RangeIndex)). Copy _ Destination:=Worksheets(ShName2).Cells(LastRow + 1, 1) LastRow = LastRow + Worksheets(ShName1).Range(RangeNames(RangeIndex)). Rows.Count Next RangeIndex End Sub "ian bartlett" wrote: Hi: My problem, on sheet 1 I have 6 defined named ranges range1,range2 etc. I would like to copy them to sheet 2 starting at row 2 what would be the most efficient way to do this. thanks Bart. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy values generated by conditional formula in one sheet to the other work sheet as values | Excel Worksheet Functions | |||
copy values generated by conditional formula in one sheet to the other work sheet as values | Excel Discussion (Misc queries) | |||
how to find and copy values on sheet 2, based on a list on sheet 1 | Excel Programming | |||
how to copy values to another sheet | Excel Programming | |||
How do i compare values from two sheet and copy & paste if values match? | Excel Programming |