+ Reply to Thread
Results 1 to 2 of 2

Converting column data into rows

  1. #1
    Registered User
    Join Date
    07-24-2008
    Location
    London
    Posts
    43

    Converting column data into rows

    I have a table of information which contains:

    Owner Make 3rd Party Make
    Mark Audi David BMW
    Mark Audi Chris Volvo
    Mark Audi Vik BMW
    Ian BMW Fox Audi

    and I need the information so I can see the owner on 1 line with the 3rd Party Makes.

    Outcome:

    Owner Audi BMW Volvo Nissan Honda
    Mark Audi 0 2 1 0 0
    Ian BMW 2 0 0 0 0
    John Volvo 1 0 0 0 0
    Paul Audi 0 0 1 1 1

    I have tried using a VLOOKUP and COUNT however I can't seem to get it right. I have attached a sample however the original list runs into a few thousand Owners.

    Hope someone can assist.
    Attached Files Attached Files

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Converting column data into rows

    Ray789,

    In the "Outcome" section, do you have a column already populated? or is this being built from scratch? Does each owner only have 1 column B Make? (as in the example, each owner has only one column B make, though the dolumn D make varies).

    If the table is being built from scratch and you need a unique list of owners, you can do the following to extract the list of owners with no duplicates:
    1. Select column A
    2. Data -> Advanced Filter
    3. Select "Copy to another location"
    4. Make sure the list range contains only column A from the header to the last row (sometimes the advanced filter auto-populator can be on the stupid side and will populate the list range with columns you don't have selected)
    5. Set the Copy to to a blank column
    6. Check "Unique records only" -> OK
    That will generate a list of owners with no duplicates. Then you can use that list of owners to populate the table:

    To pull the Column B make (again, this assumes there is only 1 column B make per owner):
    =VLOOKUP(O3,A:D,2,FALSE)

    To get the number of Column D makes per owner, since you're using 2007 you can use CountIfs:
    =COUNTIFS(D:D,"Audi",A:A,"Mark")

    And so on. You would replace "Mark" with the cell containing the Mark in the unique list of names. For example, had you set the Copy To to column F, and Mark was in row 2, then you would replace the "Mark" with F2
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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