+ Reply to Thread
Results 1 to 6 of 6

Repeating loop till no values remain

  1. #1
    Registered User
    Join Date
    05-30-2014
    Posts
    2

    Repeating loop till no values remain

    I am trying to complete a data transformation where all my reords are in a singel colum and contain 4 rows for each. I want to transpose the 4 rows in colum A to 1 row with 4 columns starting in cell C1 and inserting the repeated row offset by 1 row (i.e. cell c2) I have created the base function that I want to accomplish, but am having difficulty setting up the loop. See code below...

    Thanks,
    Scott

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer

    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 05-30-2014 at 01:08 PM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,037

    Re: Repeating loop till no values remain

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    05-30-2014
    Posts
    2

    Re: Repeating loop till no values remain

    Mumps1,

    Thank you. This was the perfect solution.

  4. #4
    Forum Contributor
    Join Date
    06-21-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Repeating loop till no values remain

    Is A5 a blank row? Just curious.

    For future reference, you don't need to select a given range, and then copy it, and then select a new range, and then paste it. I do believe you can just Range("A1:A4").Copy("C1")

    At any rate, I'd much prefer to take the values in A, populate an array, and then paste those array values.

    Assuming A5 is not blank (and all data is in sequential rows), it would look something like:
    Please Login or Register  to view this content.

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,037

    Re: Repeating loop till no values remain

    My pleasure.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Repeating loop till no values remain

    Maybe:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Loop till last row
    By reincarnation.x in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-23-2013, 08:02 AM
  2. [SOLVED] Loop till end of the sheet and loop back to first column again
    By smlim7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-29-2012, 10:03 AM
  3. [SOLVED] How to remain initial cell value after loop
    By alee001 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-21-2012, 01:09 PM
  4. [SOLVED] How to loop till last row with data?
    By btmtdk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-19-2012, 10:37 AM
  5. SUMIF and LOOP till the last row
    By georgeanaprop in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-01-2010, 02:26 AM

Tags for this Thread

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