+ Reply to Thread
Results 1 to 4 of 4

Pivot Table with Unique Columns

  1. #1
    Forum Contributor
    Join Date
    04-30-2013
    Location
    D.C.
    MS-Off Ver
    Excel 2010
    Posts
    192

    Pivot Table with Unique Columns

    Hello Excellers,

    I am working on creating a pivot table where the data is being deprived from a database. More details are described below:

    Deprived Data:
    A:A is a list of names
    B:B is a list of four different labels

    Issue #1: B:B has UP to four different labels (Some could have 1, 2. 3 or all 4 labels and so on).
    Issue #2: B:B would look like this Apple, Berry, Cabbage, Dragonfruit. I want to be separated in its own column (Text-to-Column??)
    Issue #3: In the pivot table, I want the labels to have approriate labels in their own columns regardless of the number of labels each name has (i.e. All Apple should be located in the column of "Apple", all Berry should be located in the column of "Berry" and so on)

    An example of the raw data:

    Name Label(s)
    V Apple, Berry, Cabbage
    X Berry, Cabbage
    Y Apple
    Z Apple, Berry, Cabbage, Dragonfruit


    The 'result' pivot table I would like to see is below:

    Name Apple Berry Cabbage Dragonfruit
    V ✓ ✓ ✓
    X ✓ ✓
    Y ✓
    Z ✓ ✓ ✓ ✓


    I have a feeling this is actually an easy thing to develop... But I lack the expertise to do so.

    Help would be much appreciated!

    Thanks!!!

  2. #2
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Pivot Table with Unique Columns

    Hi excellenthelp

    First thanks for providing a chuckle - your typo makes me want to take the "p" out of you - but I will deprive myself of the opportunity.

    I attach a solution that seems to work.

    The pivot table headings was "Sum of Apple" etc. I tried to change that to "Apple" as per your request, but was not allowed to because that is already a header in the base data - so I used "Apples" instead.

    Hope this meets your requirements.

    Regards
    Alastair
    Attached Files Attached Files

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Pivot Table with Unique Columns

    Hi excelenthelp,

    I have a different way to calculate the number of times a work appears in a string. See my formulas and the pivot table. I allow for multiple apples to appear in the same string and it counts them correctly. I also allow for the same name to appear in Col A. This is just another possible method to get to your deprived problem.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Contributor
    Join Date
    04-30-2013
    Location
    D.C.
    MS-Off Ver
    Excel 2010
    Posts
    192

    Re: Pivot Table with Unique Columns

    Aydeegee (Alastair),

    Thanks!! The spreadsheet you shared with me works great. I am going to use it in my spreadsheet.

    As for you, MarvinP- thank you for your contribute too!

    Marking this as SOLVED.

+ 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. Counting unique items from different columns using pivot table
    By F16Stevie in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 06-14-2013, 04:13 AM
  2. Replies: 1
    Last Post: 11-29-2012, 06:24 PM
  3. Replies: 0
    Last Post: 03-22-2012, 08:44 PM
  4. Count unique value in pivot table
    By minkus in forum Excel General
    Replies: 4
    Last Post: 11-29-2010, 02:49 PM
  5. [SOLVED] unique records in Pivot Table
    By lucas in forum Excel General
    Replies: 2
    Last Post: 02-06-2006, 12:25 PM

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