+ Reply to Thread
Results 1 to 6 of 6

Reordering data in worksheet

  1. #1
    Registered User
    Join Date
    01-08-2021
    Location
    Detroit
    MS-Off Ver
    360
    Posts
    2

    Reordering data in worksheet

    I have to move data from multiple rows and columns associated with one record into a single row (in the example Position, Organization, and Job 1 - Job 5 percentages are on different rows and columns). There are approximately 500 data records that require this operation. I recorded a macro to do this operation in the first data set (which also clears the unnecessary rows after the data has been moved) but have no idea how to get that to run on the second data set below the first data set row (and subsequent rows). Any help would be appreciated. Here is the macro, it's obviously useful for only one row.
    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Attached Files Attached Files
    Last edited by 6StringJazzer; 01-08-2021 at 05:09 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Reordering data in worksheet

    Hi,

    The attached uses this macro on Sheet1. Just click the blue button.
    The Original data tab I left in for testing and refreshing sheet1.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Reordering data in worksheet

    Here is another solution;

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Reordering data in worksheet

    Quote Originally Posted by maniacb View Post
    Here is another solution;
    Neat!

    Bear in mind this will work quickly for the 26 rows in the example but where there are 500 records, implying 2500 rows, a macro that has to jump back and forth between VBA and the Excel App at every pass through the loop will be quite slow.

  5. #5
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Reordering data in worksheet

    Richard, you’re absolutely right. Your code will without a doubt work much more quickly than mine. Thanks for the feedback.

  6. #6
    Registered User
    Join Date
    01-08-2021
    Location
    Detroit
    MS-Off Ver
    360
    Posts
    2

    Re: Reordering data in worksheet

    Thank you for this! It works great and your solution gives me a better understanding of macros, still wrapping my head around this tool.

+ 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. [SOLVED] Reordering Data For Adding Into Database
    By Cobalt42 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-11-2020, 05:09 PM
  2. [SOLVED] Matching cells and reordering data
    By $mart Group in forum Excel General
    Replies: 4
    Last Post: 03-23-2018, 01:46 AM
  3. Replies: 11
    Last Post: 05-16-2016, 04:12 PM
  4. Reordering rows based on data
    By larix93 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2015, 04:17 AM
  5. [SOLVED] Reordering Data
    By akboche in forum Excel General
    Replies: 5
    Last Post: 01-09-2015, 03:23 PM
  6. Parsing / Reordering Data for Easy Duplicate Finding?
    By bikeking8 in forum Excel General
    Replies: 2
    Last Post: 04-27-2013, 07:39 AM
  7. [SOLVED] Help Reordering worksheet columns
    By melliesue in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-22-2012, 11:57 AM

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