+ Reply to Thread
Results 1 to 6 of 6

Help! Equally spaced cell reference

  1. #1
    Registered User
    Join Date
    07-05-2006
    Posts
    7

    Help! Equally spaced cell reference

    Can anyone help with the following please:

    On one work sheet I have data equally spaced vertically, ie cell 1 is A, cell 11 is B, cell 21 is C etc...

    On another worksheet I want to make a list of A,B,C... ie 1 maps to 1, 2 maps to 11, 3 maps to 21 and so on.

    Is there a way I can automate/autofill this. This is a simplicfication of the problem but I can't find a way to do it. Any idead?

    Cheers

    Geoff

  2. #2
    Forum Contributor
    Join Date
    02-28-2006
    Posts
    690
    in macro code cell A1 is cells(1,1)

    cell B5 is cells(5,2)

    so you need to write a simple macro along the lines of

    for j=1 to 1100 step 10
    cells(j,1)="A"
    next j
    end

    if your data to be inserted is in a list in column Z try

    for j=1 to 1100 step 10
    sum=sum+1
    cells(j,1)=cells(sum,26)
    next j
    end

  3. #3
    Forum Contributor
    Join Date
    02-28-2006
    Posts
    690
    in macro code cell A1 is cells(1,1)

    cell B5 is cells(5,2)

    so you need to write a simple macro along the lines of

    for j=1 to 1100 step 10
    cells(j,1)="A"
    next j
    end

    if your data to be inserted is in a list in column Z try

    for j=1 to 1100 step 10
    sum=sum+1
    cells(j,1)=cells(sum,26)
    next j
    end

  4. #4
    Registered User
    Join Date
    07-05-2006
    Posts
    7
    Cheers, I'll give it a go. I'd have thought there was a more simpler way to do it though!

  5. #5
    Registered User
    Join Date
    07-05-2006
    Posts
    7
    Cheers, I'll give it a go. I'd have thought there was a more simpler way to do it though!

  6. #6
    David Biddulph
    Guest

    Re: Help! Equally spaced cell reference

    "geoff1234" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Can anyone help with the following please:
    >
    > On one work sheet I have data equally spaced vertically, ie cell 1 is
    > A, cell 11 is B, cell 21 is C etc...
    >
    > On another worksheet I want to make a list of A,B,C... ie 1 maps to 1,
    > 2 maps to 11, 3 maps to 21 and so on.
    >
    > Is there a way I can automate/autofill this. This is a simplicfication
    > of the problem but I can't find a way to do it. Any idead?


    If your 1,2,3 are in A1, A2, A3, etc.
    then in B1 use
    =1+10*(A1-1)
    and copy down.
    --
    David Biddulph



+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

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