+ Reply to Thread
Results 1 to 8 of 8

How to create a pivot table on a field with multiple answers per cell?

  1. #1
    Registered User
    Join Date
    09-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    How to create a pivot table on a field with multiple answers per cell?

    Hi,

    I'm trying to figure out the best way to analyze a set of data I have. A pivot should do just fine, but the problem is that I have multiple results in some cells. For example, I have a column to mark which pies a person mentions in a tweet. A person mentions pecan and pumpkin, and they are entered into the one cell separated by a comma. How do you recommend handling that for a data set of a few hundred rows, ten columns and most columns have the option for multiple answers per cell?

    This is my first post, so please be gentle. Thank you!
    pivotquestion.xlsx

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: How to create a pivot table on a field with multiple answers per cell?

    Hi, welcome to the forum

    What would a sample answer look like?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: How to create a pivot table on a field with multiple answers per cell?

    Based on what I *think* you may want, I came up with this. It starts with all possible unique items as headings across the top of a table...
    J
    K
    L
    M
    N
    1
    1
    2
    3
    4
    5
    2
    1
    2
    2
    2
    1
    3
    1
    2
    2
    2
    1

    (I only went to 5, just to give you the concept).
    J2=COUNTIF($C$2:$F$2,"*"&J$1&"*")
    copied down and across

    You could them sum each column?

  4. #4
    Registered User
    Join Date
    09-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How to create a pivot table on a field with multiple answers per cell?

    Thanks! The goal is to look at the correlations between the answers in each column, relative to date. So one example would be to get the number of mentions of each kind of pie by day. Does that help?

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: How to create a pivot table on a field with multiple answers per cell?

    Did you see my 2nd post?

  6. #6
    Registered User
    Join Date
    09-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How to create a pivot table on a field with multiple answers per cell?

    So would that mean duplicating each row as well? My concern is that several columns have been 10-20 different options.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: How to create a pivot table on a field with multiple answers per cell?

    Sorry, I thought you wanted it by row, Try this, I added some more data...
    A
    B
    C
    D
    E
    F
    1
    ID Relevant Topic 1 Topic 2 Topic 3 Topic 4
    2
    32904328
    1
    1, 2
    4, 5, 7, 8
    3, 4
    2, 3
    3
    32904327
    1
    2
    1, 2, 3
    3
    4
    4
    123456
    1
    1, 2,2
    4, 5, 7, 8,1, 2, 3
    3, 4,3
    2, 3,4


    Then for the summary...
    J
    K
    L
    M
    N
    7
    1
    2
    3
    4
    5
    8
    4
    6
    6
    5
    2

    J8=COUNTIF($C$2:$F$4,"*"&J$7&"*")
    Adjust the range $C$2:$F$4 to suite

  8. #8
    Registered User
    Join Date
    09-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How to create a pivot table on a field with multiple answers per cell?

    Thanks! I think I understand, I'm going to try implementing and see how it goes.

+ 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. Pivot table - Multiple field value settings for 1 field
    By katrina.pak in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-11-2015, 04:07 PM
  2. Replies: 0
    Last Post: 03-06-2014, 07:21 AM
  3. Create and rename multiple sheets based on pivot-table field
    By Aerobane in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-10-2013, 02:22 AM
  4. Replies: 1
    Last Post: 11-23-2007, 03:11 AM
  5. create calculated field in pivot table
    By kkerig in forum Excel General
    Replies: 2
    Last Post: 06-19-2005, 12:05 AM
  6. Replies: 0
    Last Post: 05-16-2005, 06:06 PM
  7. Using Pivot Table to analyze multiple answers
    By wengyee in forum Excel General
    Replies: 1
    Last Post: 03-09-2005, 09: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