+ Reply to Thread
Results 1 to 13 of 13

Transpose Rows Into Columns Based on Cell Value

  1. #1
    Registered User
    Join Date
    07-09-2018
    Location
    USA
    MS-Off Ver
    2013
    Posts
    7

    Transpose Rows Into Columns Based on Cell Value

    Hey guys!

    I have a set of data in column A that is about 6000 cells long. It contains name, email address, and a "chapter (I thought I could use this as a unique identifier), set up like this:

    Name
    Email Address
    Chapter: *Los Angeles* <- example

    Problem is that when the data was imported the email addresses were weird and went into multiple rows. So the data I have looks like this:

    Doe, John
    john.doe(AT)
    mail(dot)com
    Chapter: JohnnyDoe
    Doe, John
    john.doe(AT)mail(dot)com
    Chapter: JohnnyDoe

    This goes on fairly randomly for the rest of the data. I need a way to get the data into a format like this for a CSV file:

    Name / Email / Chapter
    Name / Email / Chapter
    etc

    The only thing I can find online is how to use the INDEX function for transposing data for a set number of lines, but my number changes constantly. Hopefully the "Chapter" identifier can help a little.

    Thanks in advance!

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Transpose Rows Into Columns Based on Cell Value

    Attach example EXCEL file (not a picture, pasted text or any other than Excel format!). This file should be attached to a new post. Never change your original post (except admin's request).

    To attach an Excel file to your post,
    • desensitize data
    • remeber that your example should reflect structure and type of data and contain the result what you want to achieve (manually created if necessary)
    • click Go Advanced,
    • scroll down until you see Manage Attachments,
    • click that and select Browse,
    • select your file and click Open,
    • click Upload and you will see your attachment below Upload Files from a website
    • click Close this window,
    • click Submit reply
    After that you should see attachment in your post

  3. #3
    Registered User
    Join Date
    07-09-2018
    Location
    USA
    MS-Off Ver
    2013
    Posts
    7

    Re: Transpose Rows Into Columns Based on Cell Value

    Here is a brief section of the document I am working with.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-12-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2013
    Posts
    39

    Re: Transpose Rows Into Columns Based on Cell Value

    Hi
    Is your attachment indicative of the data? ie is it inconsistently broken up? Do you have the chance to add field prefixes like name/email in addition to the chapter?
    If it was
    name
    email
    chapter
    I have a solution but if the names and addresses are not consistently spaced it will need a different solution.

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Transpose Rows Into Columns Based on Cell Value

    If you are able to use PowerQuery

    Power Query for


    try this:

  6. #6
    Registered User
    Join Date
    07-09-2018
    Location
    USA
    MS-Off Ver
    2013
    Posts
    7

    Re: Transpose Rows Into Columns Based on Cell Value

    Hi,

    Yes it is inconsistently broken up.

    I can't add prefixes sadly.

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Transpose Rows Into Columns Based on Cell Value

    with PowerQuery you can add prefix, suffix, whatever and didn't touch source table

  8. #8
    Registered User
    Join Date
    07-09-2018
    Location
    USA
    MS-Off Ver
    2013
    Posts
    7

    Re: Transpose Rows Into Columns Based on Cell Value

    I am unable to use PowerQuery.

  9. #9
    Registered User
    Join Date
    07-09-2018
    Location
    USA
    MS-Off Ver
    2013
    Posts
    7

    Re: Transpose Rows Into Columns Based on Cell Value

    I have now been able to add prefixes in Column A, and the same data as before in Column B.

    Name / Doe, John
    Email / johndoe(AT)gmail
    Chapter / Chapter:GHNAJK

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Transpose Rows Into Columns Based on Cell Value

    For the data uploaded in your workbook,
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    07-09-2018
    Location
    USA
    MS-Off Ver
    2013
    Posts
    7

    Re: Transpose Rows Into Columns Based on Cell Value

    Thanks!!

    It wasn't perfect, but I got it working.

    I appreciate the help.

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Transpose Rows Into Columns Based on Cell Value

    Quote Originally Posted by emd62897 View Post
    T
    It wasn't perfect, but I got it working.
    How wasn't it perfect?
    You didn't even provide your desired result.

  13. #13
    Registered User
    Join Date
    07-09-2018
    Location
    USA
    MS-Off Ver
    2013
    Posts
    7

    Re: Transpose Rows Into Columns Based on Cell Value

    Your code worked perfectly, it was a formatting issue which can me attributed to me to not being specific on how I wanted the data to look.

    Thanks for helping.

+ 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. 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
  2. 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
  3. Pasting rows based on cell value and transpose details in one column
    By Ginnie_theangel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2016, 08:28 AM
  4. Replies: 8
    Last Post: 02-03-2015, 03:42 PM
  5. [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
  6. Replies: 1
    Last Post: 01-24-2014, 06:20 PM
  7. [SOLVED] Transpose Columns to Rows (automatically inserts new rows)
    By kichkichkich in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-28-2012, 05:38 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