+ Reply to Thread
Results 1 to 2 of 2

Transpose unique numbers based on another column

  1. #1
    Registered User
    Join Date
    06-09-2011
    Location
    Toronto
    MS-Off Ver
    Excel 2007
    Posts
    17

    Transpose unique numbers based on another column

    Hello all,

    In a previous post, I was explaining a dataset that I need to do a "basket analysis" on. The dataset is 40,000+ Rows big. And after a few days of thought, here is my thoughts on a solution.

    I have a dataset that currently looks like this:

    Product Type Unique ID <<3 Rows Not Needed>> Product Category Rank/Sort
    Apples 145 Fruit 1
    Oranges 145 Fruit 2
    Celery 122 Veggie 1
    Bananas 122 Fruit 2
    Lettuce 167 Veggie 1
    Apples 555 Fruit 1
    Celery 555 Veggie 2
    Bannanas 555 Fruit 3
    Lettuce 555 Veggie 4

    To do the analysis that I want, what I want to do is transpose the data into a format like this:

    Rank/Sort>> 1 2 3 4
    122 Celery Banana
    145 Apples Orages
    167 Lettuce
    555 Apple Celery Bannana Lettuce

    So that I can then easily create an array based on this information for further analysis, and have two columns:

    122 {Celery,Banana}
    145 {Apples,Oranges}
    167 {Lettuce}
    555 {Apple, Celery,Bannana, Lettuce}

    With the data in arrays, I can then find out patterns/compare/analyze based on who ordered Apples and Lettuce and in what order. And who ordered Just Oranges without lettuce, etc...

    Ideally this would be done with formulas, as the data set will be reduced and expanded in the future... but its nothing to run a macro after it is cleaned.

    I am at my wits end with this macro, and any help is much appreciated! Thanks!

  2. #2
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,419

    Re: Transpose unique numbers based on another column

    ideal job for a dictionary, do you have an example ? (excelfile)
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

+ 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. Replies: 1
    Last Post: 10-16-2013, 02:46 PM
  2. [SOLVED] Transpose numbers in groups of Column to Rows
    By Dumy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-24-2013, 11:46 AM
  3. [SOLVED] Counting a column of numbers based on a unique identifier
    By aaanenson in forum Excel General
    Replies: 2
    Last Post: 08-23-2012, 09:01 PM
  4. how do I transpose a column of 80 numbers into...
    By beatrice25 in forum Excel General
    Replies: 8
    Last Post: 05-21-2006, 05:35 AM
  5. Transpose unique values in one column/mult. rows into a single row
    By Wil in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-22-2005, 04:06 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