+ Reply to Thread
Results 1 to 4 of 4

a macro question

  1. #1
    Registered User
    Join Date
    10-08-2005
    Posts
    5

    a macro question

    I wish to copy a column of numbers, a number in every 5th row, from sheet1 to sheet 2 same column but in consecutive rows.

    I have tried to write a do loop to do this but I have to have a variable in the adress of a cell (eg R[2]C) has to be R[p]C where p is counter increasing by 5 every cycle in th eloop.


    Thanks for any assistance

    Bill

  2. #2
    Forum Contributor
    Join Date
    07-13-2006
    Posts
    400
    a simple for loop with a step of 5 will do the trick

    Please Login or Register  to view this content.
    --Mark

    Quantum materiae materietur marmota monax si marmota monax materiam possit materiari?

  3. #3
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    It is usually better to post your code so someone can let you know what you are doing wrong. This code works for the first row in any column, then every 5th after that. You can change it to meet your needs. You don't state if it is always the same column, so I have made it variable - you need to click in the column that you want to copy.


    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-08-2005
    Posts
    5
    Thanks. Problem solved!

+ 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