+ Reply to Thread
Results 1 to 7 of 7

Pivot table to list multiple source columns in rows

  1. #1
    Registered User
    Join Date
    03-16-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    10

    Pivot table to list multiple source columns in rows

    Hello all,

    could somebody help me with this problem:

    I have a huge data set with survey data (sample attached: sample.xlsx).
    Column headings: survey questions
    Row headings: respondent identifiers (names)
    Row data: answers to questions (numeric values, only five answer options 1,2,3,4 or 5, no blanks)

    I need to build that kind of pivot table:

    Rows - list of particular questions (i.e. questions no. 3, 7 and 12)
    Columns - list of all diffrent answer entries (eventually, it will be 1,2,3,4 and 5) - it could also be questions in columns and answers in row (no difference)
    Values - count answer entries (i.e. how many answers "5" are on quesiton 3)

    ------
    UPDATE: explanation added.

    The reason I need pivot tables: i'll have to cross analyze multiple sets of questions. I'll have to do such cross-analysis 100+ times, so, writing a formula for each time does not quite work...

    i.e. how people who answered 1,2 or 3 to question 12, answered to quesitions 2, 8, 9 and 102. if I manage to get these pivot tables, i'll be able to do such analysis by adding filters.
    -------


    Thanks a lot in advance!

    G.
    Last edited by geriz; 07-04-2014 at 02:32 PM. Reason: Update: explanation

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Pivot table to list multiple source columns in rows

    Hi there. It's SUMPRODUCT that you need.

    Try this out...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    03-16-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Pivot table to list multiple source columns in rows

    Hi. Thanks for the reply.

    The thing is I need to cross analyze multiple sets of questions.
    i.e. how people who answered 1,2 or 3 to question 12, answered to quesitions 2, 8, 9 and 102.
    if I manage to get these pivot tables, i'll be able to do such analysis by adding filters.

    I'll have to do such comparisons 100+ times, so, writing a formula for each one does not quite work...

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Pivot table to list multiple source columns in rows

    With this macro to re-arange the data.

    After that you can easy analyze with the desired pivot table.

    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    03-16-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Pivot table to list multiple source columns in rows

    Hi Oeldere,

    thanks a lot for the macro! We are almost there.

    However, I did not manage make a pivot table with filters. I made a pivot table like that:
    columns - value
    rows - question
    values - count of name
    nothing left for filters (i need a possibility to add any of the questions there)

    I have manually etited the Output sheet in a way which enables a possibility to add any of the questions as pivot table filter (not sure if its the best way, but it works). The sheet Results-perfect shows the pivot table which solves all my problems.

    Please check out the file: (oeldere) 330026d1404483924-pivot-table-to-list-multiple-source-columns-in-rows-sample-V2.xlsm

    Could you help me with the macro to re-arrange data in the latter way (I hope its not too complicated)?

    Regards,
    G.

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Pivot table to list multiple source columns in rows

    If that is your desired result, you could record the macro with the macro-recorder.

    I have no macro for that available.


    Advice:

    You noticed the sort of the question is not logic.

    You could change the question 1 to 01, 2 to 02 etc.

    In that case the data will sort on a logic way.

  7. #7
    Registered User
    Join Date
    03-16-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: Pivot table to list multiple source columns in rows

    Hi Oeldere,

    thanks for the numbering advice and that previous macro you shared. You have put me on the right track, I'll try to finish it by myself.

+ 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: 2
    Last Post: 03-07-2013, 02:16 PM
  2. Replies: 1
    Last Post: 11-29-2012, 06:24 PM
  3. Replies: 3
    Last Post: 02-27-2012, 08:03 PM
  4. Hidden columns in pivot table source data
    By Kaigi in forum Excel General
    Replies: 2
    Last Post: 07-17-2009, 09:34 AM
  5. Pivot Table Source List ?
    By skizz135 in forum Excel General
    Replies: 9
    Last Post: 06-24-2008, 08:03 PM

Tags for this Thread

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