Beginning with the following line of code

Sheet2.Range("b3").value = Sheet1.Range("b14").value

I need a loop that will step down 1 row on the left side and 15 rows on the
right side each time and that will repeat 42 times.

ie:
Sheet2.Range("b3").value = Sheet1.Range("b14").value
Sheet2.Range("b4").value = Sheet1.Range("b29").value

Any help would be greatly appreciated.

Christy

2. ## Re: Looping help please

For i = 1 To 42
Sheet2.Range("B" & i + 2).Value = Sheet1.Range("B" & i * 15 -
1).Value
Next i

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Christy" <Christy@discussions.microsoft.com> wrote in message
news:BEF50C9C-074E-4CB7-8F62-9CFD8D83117F@microsoft.com...
> Beginning with the following line of code
>
> Sheet2.Range("b3").value = Sheet1.Range("b14").value
>
> I need a loop that will step down 1 row on the left side and 15 rows on

the
> right side each time and that will repeat 42 times.
>
> ie:
> Sheet2.Range("b3").value = Sheet1.Range("b14").value
> Sheet2.Range("b4").value = Sheet1.Range("b29").value
>
> Any help would be greatly appreciated.
>
> Christy
>

3. ## Re: Looping help please

You the man Bob, it looks good to me.

"Bob Phillips" wrote:

> For i = 1 To 42
> Sheet2.Range("B" & i + 2).Value = Sheet1.Range("B" & i * 15 -
> 1).Value
> Next i
>
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> "Christy" <Christy@discussions.microsoft.com> wrote in message
> news:BEF50C9C-074E-4CB7-8F62-9CFD8D83117F@microsoft.com...
> > Beginning with the following line of code
> >
> > Sheet2.Range("b3").value = Sheet1.Range("b14").value
> >
> > I need a loop that will step down 1 row on the left side and 15 rows on

> the
> > right side each time and that will repeat 42 times.
> >
> > ie:
> > Sheet2.Range("b3").value = Sheet1.Range("b14").value
> > Sheet2.Range("b4").value = Sheet1.Range("b29").value
> >
> > Any help would be greatly appreciated.
> >
> > Christy
> >

>
>
>

4. ## Re: Looping help please

I tried this and got the following error

Method 'Range' of object '_Worksheet' failed

Can you tell me what I am doing wrong?

"Bob Phillips" wrote:

> For i = 1 To 42
> Sheet2.Range("B" & i + 2).Value = Sheet1.Range("B" & i * 15 -
> 1).Value
> Next i
>
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> "Christy" <Christy@discussions.microsoft.com> wrote in message
> news:BEF50C9C-074E-4CB7-8F62-9CFD8D83117F@microsoft.com...
> > Beginning with the following line of code
> >
> > Sheet2.Range("b3").value = Sheet1.Range("b14").value
> >
> > I need a loop that will step down 1 row on the left side and 15 rows on

> the
> > right side each time and that will repeat 42 times.
> >
> > ie:
> > Sheet2.Range("b3").value = Sheet1.Range("b14").value
> > Sheet2.Range("b4").value = Sheet1.Range("b29").value
> >
> > Any help would be greatly appreciated.
> >
> > Christy
> >

>
>
>

5. ## Re: Looping help please

SORRY! I just had a typo - that worked great
Thank you!!!!!!

Christy

"Christy" wrote:

> Thanks for your help Bob!
>
> I tried this and got the following error
>
> Method 'Range' of object '_Worksheet' failed
>
> Can you tell me what I am doing wrong?
>
> "Bob Phillips" wrote:
>
> > For i = 1 To 42
> > Sheet2.Range("B" & i + 2).Value = Sheet1.Range("B" & i * 15 -
> > 1).Value
> > Next i
> >
> >
> > --
> > HTH
> >
> > Bob Phillips
> >
> > (replace somewhere in email address with gmail if mailing direct)
> >
> > "Christy" <Christy@discussions.microsoft.com> wrote in message
> > news:BEF50C9C-074E-4CB7-8F62-9CFD8D83117F@microsoft.com...
> > > Beginning with the following line of code
> > >
> > > Sheet2.Range("b3").value = Sheet1.Range("b14").value
> > >
> > > I need a loop that will step down 1 row on the left side and 15 rows on

> > the
> > > right side each time and that will repeat 42 times.
> > >
> > > ie:
> > > Sheet2.Range("b3").value = Sheet1.Range("b14").value
> > > Sheet2.Range("b4").value = Sheet1.Range("b29").value
> > >
> > > Any help would be greatly appreciated.
> > >
> > > Christy
> > >

> >
> >
> >

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1