I am making some VBA code to help me do the following:
Paste a list of all named ranges Loop through the list and copy/select ranges based on the list Each selection will be pasted on another sheet given an address reference with a certain offset from that address
I am pretty new to VBA so I have put together some code that I think will do the trick but I am getting run time errors. Could someone help me troubleshoot or provide suggestions?
My code is here:
Sub RangeLoop()
Sheets("RANGEMATCH").Select
Range("A1").ListNames
Dim columnrange As Range
Dim m As Long
Dim address As Range
Set columnrange = Sheets("RANGEMATCH").Range("A:A").SpecialCells(xlConstants)
With columnrange
For m = 1 To columnrange.Areas.Count
Set address = Sheets("RANGEMATCH").Range(.Areas(m).Cells(1, 7).Value)
Range(m).Copy Sheets("ETIE").Range(address.Offset(1, 10))
Next
End With
End Sub
Here is an example workbook of what I am working with:
https://docs.google.com/spreadsheet/ccc?key=0AodOP_8DnJnFdHJoQ0xBM3JUUGJxT3EyRXN0T2ltUmc&usp=sharing
Any suggestion are appreciated.