Go to named range nominated by user

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.
 
J

Jacob Skaria

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top