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!
 

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