How to use a range name in a macro

C

CompetiveLat

Hello and thanks,

I need to know how to use a named range in a macro!!! - Help.

(This in order to delete easily a range of cells)
 
B

Bob Phillips

myVal = Range("myRange").Value

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
S

StumpedAgain

If you've already named the range you can simply use:

Range("myRange")

where myRange is your named range. If you want to assign a range to a name,
you can use:

Range("B1:C12").Name = "myRange"

Hope this helps!
 
Top