I am trying to paste the contents of a Named Range, based on the active cell contents (which is from a data validation dropdown).
The active cell contents is equal to the Named Range name.
There are 40 odd Named Ranges in the sheet, and I want to paste them into a column by selecting a specific cell and calling the macro.
I can create the variable and assign the active cell contents to the variable, but I don't see how to assign the variable to the name of the named range and paste the contents.
I have tried the following code:
Sub PrintRange()
'
' PrintRange Macro
'
' Keyboard Shortcut: Ctrl+Shift+L
'
Dim LO As Variant
Set LO = ActiveCell
Application.Goto Reference:="LO"
Selection.Copy
Sheets("Test page").Select
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
Could anyone give me some advice?