View Single Post
  #2   Report Post  
Bernard Liengme
 
Posts: n/a
Default

This will give you a start
Sub try()
test =Ucase( Range("E1"))
Select Case test
Case "A"
Range("A").Select
Case "B"
Range("B").Select
Case "C"
Range("C_").Select
End Select
Selection.Copy
Range("E5").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("E1").Select
End Sub


Note you cannot have a range called C it must be C_ (likewise R_)
The entry in E1 must be committed (with ENTER key or green checkmark in
Formula Bar) before running macro
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"JD Ami" wrote in message
...
I have four ranges named A, B, C, D.
I need to be able to copy (and paste) one of them when its name is
entered in a cell.
What is the macro syntax to get the value in a cell and use it to select
a range, please?
I would attach this macro to a button (which I know how to do) to allow
the user to enter the range name and click the button to copy it to a
fixed location (that I know how to specify)
Thanks!.