View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Macro for Range Names

Couple of typos

Set rng = Range("C2",Cells(Rows.Count,"C").End(xlUp))
rng.Name = "myRange"


--

HTH

RP
(remove nothere from the email address if mailing direct)


"SamDev" wrote in message
. ..
I get an error message when I tried that - I must be missing something -

"object doesn't support this property or method"

Set rng = Range("C11", Cells(Rows.FCount, "C").End(xlUp))
rng.Name = data

Above is what I set tried - C11 is the starting point and name for the

range
is "data".

Thx

"Bob Phillips" wrote in message
...
I don't know where the range is, but something akin to this should work

Set rng = Range("C2",Cells(Rows.FCount,"C").End(xlUp))
rng.Name = 2myRange"

--

HTH

RP
(remove nothere from the email address if mailing direct)


"SamDev" wrote in message
. ..
I need to create a macro that will create a range name - I'm OK to do
that
but my issues is each month the range name's "range" changes. I have

set
it
up so each month the original range name is deleted and a new one

created
that covers the additional rows of data. The starting cell (row/column)

and
the number of columns stays the same, it's just the number of rows that
change. I know there are ways to count the number of rows but not sure
how
it set this up with the range name - any help would be appreciated.

Thx.