Excel macro to name ranges.

G

Guest

I need an Excel macro to name ranges. The ranges always start in column A
and end in column U. The problem is that the ranges aren't the same number
of rows. The names are based on numbers such as _1, _2 etc. They often are
more than 900 ranges.
 
T

Tom Ogilvy

To give A1:U2 the name Name_1

Range("A1").Resize(2,21).Name = "Name_1"

You have given no information on determining how many rows a range might
have or how the name would be determined.
 

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