A named range of 6 cells ("MyRange") contains the names of 6 other named single-cell ranges (locations) within a worksheet.
Assuming a preceding loop that ultimately results in a 'selection.cut' of a certain range, how would I:
1. Loop through MyRange and then paste the preceding selection to that location? My effort is provided below, which bombs on the Application.Goto Range(rngLocation). I feel like I need to indirectly reference the names within MyRange.
Thanks -w0ok-
Assuming a preceding loop that ultimately results in a 'selection.cut' of a certain range, how would I:
1. Loop through MyRange and then paste the preceding selection to that location? My effort is provided below, which bombs on the Application.Goto Range(rngLocation). I feel like I need to indirectly reference the names within MyRange.
Code:
Sub Sample()
Dim MyRange As Range
Dim RngCell As Range
Dim rngLocation As Range
'Preceding loop code...Selection.Cut
For Each RngCell In Range("MyRange")
Set RngCell = rngLocation
Application.Goto Range(rngLocation)
ActiveSheet.Paste
Application.CutCopyMode = False
Next RngCell
'Back into outer loop...End If
iterator = iterator + 1
Loop
End Sub