+ Reply to Thread
Results 1 to 2 of 2

Transpose rows into columns based on same ID value

  1. #1
    Registered User
    Join Date
    08-03-2019
    Location
    Illinois
    MS-Off Ver
    Mac 14.7.7
    Posts
    17

    Transpose rows into columns based on same ID value

    Hi, I've spent hours trying different formulas I've found on the web and looking through posts and still am not able to figure out a way to do this with VB. I have data in a list of rows. Some of the rows have the same "Customer ID" - i.e. they belong to the same order. I'm trying to transpose the rows that have the same ID into columns in the first row where that ID is found. Not all the customers will have more than one product in their order.
    (I apologize for this format. I was trying to get the columns
    For example:


    STEP 1 (this is where I am stuck)


    excel1.jpg


    Would get transposed to look like this:

    excel2.jpg

    Then I would go onto STEP 2: I think if I can get Step 1 above done then I know how to concatenate the rows so that there is just one row for each order. i.e. it will end up looking like this eventually:

    excel3.jpg

    If someone can help me with "STEP 1" that would be hugely appreciated.

    Thx
    Last edited by Jadee77; 08-30-2019 at 11:24 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,028

    Re: Transpose rows into columns based on same ID value

    Assuming the data is sorted by ID, try this:
    (After running the code you need to sort the data again.)

    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. [SOLVED] Macro to transpose rows into columns and paste to specific columns in another sheet
    By LDLDLD in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-05-2019, 11:08 AM
  2. Transpose Rows Into Columns Based on Cell Value
    By emd62897 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-10-2018, 09:55 AM
  3. Transpose column to rows based on values in two other columns
    By jacobburdis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-11-2017, 01:48 PM
  4. Transpose Columns into Rows based on Unique Identifier for n columns
    By bhavt010785 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-01-2017, 11:55 AM
  5. Replies: 8
    Last Post: 02-03-2015, 03:42 PM
  6. [SOLVED] Formula to transpose rows to new columns and columns to new rows in Excel
    By bjnockle in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-26-2014, 06:28 PM
  7. Replies: 1
    Last Post: 01-24-2014, 06:20 PM

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