H
Howard
This little snippet does a good job of taking the non-contiguous
selected cells in named range "Fivex" and putting them in the same address on sheet 2.
How can I take the non-contiguous selected cells and list them in a column OR a row?
The commented out line renders the last selected cell in the area to the range M1.
Regards,
Howard
Option Explicit
Sub copyrng()
Dim i As Long
Dim Fivex As Range
With ActiveSheet.Range("Fivex")
For i = 1 To .Areas.Count
'.Areas.Item(i).Copy Sheets("sheet2").Range("M1")
.Areas(i).Copy Sheets("sheet2").Range(.Areas(i).Address)
Next
End With
End Sub
selected cells in named range "Fivex" and putting them in the same address on sheet 2.
How can I take the non-contiguous selected cells and list them in a column OR a row?
The commented out line renders the last selected cell in the area to the range M1.
Regards,
Howard
Option Explicit
Sub copyrng()
Dim i As Long
Dim Fivex As Range
With ActiveSheet.Range("Fivex")
For i = 1 To .Areas.Count
'.Areas.Item(i).Copy Sheets("sheet2").Range("M1")
.Areas(i).Copy Sheets("sheet2").Range(.Areas(i).Address)
Next
End With
End Sub