Go to named range nominated by user

  • Thread starter Thread starter BeSmart
  • Start date Start date
B

BeSmart

Hi
I'm a novice macro user - I apologise in advance.

In Office 2007 excel I want to create a macro that:-

1. Creates a msg book and asks the user to enter a named range e.g. "Nov_09"
2. Go to that named range on the current worksheet
3. Copy and paste values within that named range
End.

I searched past threads but I couldn't find anything that deals with a user
nominating the named range.
 
Try the below macro which works on the active sheet. Edit the destination
cell to suit your requirement

Sub Macro()
Dim strNamedRange As String

strNamedRange = InputBox("Enter the named range")
If strNamedRange <> "" Then
Range(strNamedRange).Copy Range("G1")
End If

End Sub
 
Back
Top