+ Reply to Thread
Results 1 to 6 of 6

Multiple Rows to 1 Row

  1. #1
    Registered User
    Join Date
    07-25-2019
    Location
    CA
    MS-Off Ver
    365
    Posts
    10

    Multiple Rows to 1 Row

    Hello, I have an excel file that I am looking to manipulate with a Macro. The File in Column "A" has an ID#, if the ID# matches the row under I would like to copy all the date from the 2nd Row to the first row and delete the 2nd row, and continue down until the number changes then start over. In My example there are only 3 duplicate IDs but in the actual file there are as many as 20.

    ExcelImage.jpg

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2507 Win 11
    Posts
    24,933

    Re: Multiple Rows to 1 Row

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,034

    Re: Multiple Rows to 1 Row

    This should work...
    Adapted from jindons code...
    Results on Sheet2...Ensure there is a Sheet2
    Please Login or Register  to view this content.
    Last edited by Sintek; 07-26-2019 at 09:57 AM.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  4. #4
    Registered User
    Join Date
    07-25-2019
    Location
    CA
    MS-Off Ver
    365
    Posts
    10

    Re: Multiple Rows to 1 Row

    Here is a sample file, hopefully this works. My sample file only includes 3 records that are matching, there may be as many as 20.

    Thanks in advance!
    Attached Files Attached Files

  5. #5
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,034

    Re: Multiple Rows to 1 Row

    Post 3 code works...other than numbering...Header numbering gonna be a bit tricky...Out for the evening...Will have a look in the morrow...

  6. #6
    Registered User
    Join Date
    07-25-2019
    Location
    CA
    MS-Off Ver
    365
    Posts
    10

    Re: Multiple Rows to 1 Row

    Awesome, this did the trick! Thanks!!
    Last edited by alansidman; 07-26-2019 at 05:45 PM.

+ 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] Lookup multiple criteria in multiple columns in multiple rows; return true if exists
    By ufdlim in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-07-2019, 02:03 PM
  2. Search Multiple Columns and Rows - Show results in Multiple columns and rows
    By heykeighley in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 08-12-2015, 10:16 AM
  3. Return Multiple Values with multiple rows & multiple columns
    By sachin parab in forum Excel General
    Replies: 2
    Last Post: 11-05-2012, 10:21 AM
  4. [SOLVED] Insert Multiple Rows Based Off Number in Cell and Copy Data From Above New Rows
    By tstell1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2012, 04:15 PM
  5. Multiple ccolums/rows to get data from multiple columns/rows (vlookup)
    By Ramzes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-18-2010, 05:35 AM
  6. Replies: 1
    Last Post: 05-18-2009, 11:21 AM
  7. Replies: 1
    Last Post: 03-18-2009, 04:18 PM

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