Re: Automatically define series of named ranges

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: keepITcool (xrrcvgpbby_at_puryyb.ay)
Date: 06/18/04


Date: Fri, 18 Jun 2004 09:59:05 -0700

ah!..

misread your question.

WHY set up the names anyway?

just manually enter a name like rng13
then use simple worksheetfunction offset(rng13,r,0)
or even
=offset($a$1,r,0,13,1)

that might make your pipe smoke smoother

keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >

Jon Tillman <tillmanj@smokingpipes.com> wrote:

> On Fri, 18 Jun 2004 02:33:08 -0700, keepITcool <xrrcvgpbby@puryyb.ay>
> wrote:
>
>>Sub Name13()
>>Dim r&
>>With Range([a1], [a65536].End(xlUp))
>> For r = 1 To .Rows.Count Step 13
>> .Cells(r, 1).Resize(13, 1).Name = "rng" & Format(r \ 13 + 1,
"000")
>> Next
>>End With
>>End Sub
>>
>
> This is almost what I want, but it should create output like this:
>
> rng001 : A1:A13
> rng002 : A2:A14
>
> I do that by changing Step 13 to Step 1, right?


Quantcast