+ Reply to Thread
Results 1 to 2 of 2

Convert Multiple Row data to Single Row with Multiple Columns

  1. #1
    Registered User
    Join Date
    06-17-2012
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2007
    Posts
    1

    Convert Multiple Row data to Single Row with Multiple Columns

    Hi,

    I am working with more than 50k data base(Ac No.) using Excel 2007. Some of the "Ac No." has more than 1 "Name", I wish to have all the names belongs to the same "Ac No." only shown in 1 row:

    Example:
    Ac No. Name
    1 Alvin Ltd
    1 Bolton SD
    1 Terabase td
    2 Yoyo SD
    2 Get Ltd
    3 Wonder Ltd
    3 Vase SDH
    3 Growth Ltd
    4 Vege SDH

    Expected Result:
    Ac No. Name 1 Name 2 Name 3
    1 Alvin Ltd Bolton SD Terabase td
    2 Yoyo SD Get Ltd
    3 Wonder Ltd Vase SDH Growth Ltd
    4 Vege SDH

    I have tried Pivot Table not it cant provide the result i wanted. Is there any Excel Formular can handle this type of data conversion? I am not good in VB and Marco at all.

    Your kind assistance is very much appreciated.

    Thanks
    Iris
    Attached Files Attached Files

  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: Convert Multiple Row data to Single Row with Multiple Columns

    Hi,

    Welcome to the forum

    The approach I'd adopt since you don't want to use VBA is as follows - also see attached.

    1. First sort your data by Acct Number

    2. With column labels on row 1 and your first account in A2:B2 enter
    C2 :
    =IF(A2<>A1,B2,C1&"_"&B2)
    D2:
    =COUNTIF(A2:A$10,A2)
    note that there is no $ sign with A2. Change the A$10 reference to your range.

    3. Copy C2:D2 down as necessary

    4. Filter column D for the value 1

    5. Copy the filtered columns A & D to a new sheet columns A & B

    6. Use Data Text to Columns delimited on Column B with the '_' character as the delimiter.

    Note the attached example has already had step 6 applied.
    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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