+ Reply to Thread
Results 1 to 6 of 6

Narrowing or Expanding Questions listed based on category(s) chosen

  1. #1
    Registered User
    Join Date
    07-17-2014
    Location
    Virginia, US
    MS-Off Ver
    MS Office 2010
    Posts
    5

    Narrowing or Expanding Questions listed based on category(s) chosen

    Hello! I have a long list of safety questions that I would like to be able to have listed in a PivotTable, I think. Currently, I have the list in Word format, with any questions that are not applicable to the job being answered as "N/A" (printed/written manually on the sheet). On certain jobs, from the beginning of the job, I know that a series of questions under a certain category will never be needed, and I would like to have the option of not including them on the answer sheet at all. That is why I think a Pivot Table would be best. I have tried just adding the different categories to the "Row" field in the Pivot Table Field list, but all that gives me is the first question alphabetically, under each category in an outline type list, followed by all of the next questions alphabetically, and so on. I was hoping to have all of one category shown if chosen and then all of the next, following it. Due to the lack of actual math being done, it may be easier to just have the list be chosen by the category, with all questions under that category being listed in another sheet if the category is chosen; however, I have no idea how to make those equations do what I want them to do either. Any help in either direction would be welcome.

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Narrowing or Expanding Questions listed based on category(s) chosen

    Do you want to select by whole category or also down to the questions within the categories?
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Narrowing or Expanding Questions listed based on category(s) chosen

    This might do what you want. I re-arranged the data on the Question Selection Page. I also added a page called Category Selection which is a mini-pivot table that contains a unique list of categories. If you select True next to the item it will be displayed. If you select false, the entire category will not be shown. On the Question Selection Page, you can turn on or turned off individual questions.

    The Category Selection pivot table is "overlaid" with a named dynamic range called Category_Show =OFFSET('Category Selection'!$A$4,0,0,COUNTA('Category Selection'!$A:$A)-1,2). This range is used for a VLOOKUP to determine if the category is to be viewed on the Final Pivot table. To get more information on dynamic ranges see: http://www.utteraccess.com/wiki/inde...Dynamic_Ranges.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-17-2014
    Location
    Virginia, US
    MS-Off Ver
    MS Office 2010
    Posts
    5

    Re: Narrowing or Expanding Questions listed based on category(s) chosen

    Thank you! The end result is what I was looking for.

  5. #5
    Registered User
    Join Date
    07-17-2014
    Location
    Virginia, US
    MS-Off Ver
    MS Office 2010
    Posts
    5

    Re: Narrowing or Expanding Questions listed based on category(s) chosen

    Dflak - How were you able to get the "Question Selection" to pick up which questions went with which category? I can get a similar table to pull, but only as many lines as are in the "Category Selection" pivot table. Once it gets beyond those 7 lines, it returns a "#VALUE" error due to there not being any more categories for it to look at. Your spreadsheet seems to know which category goes with which questions.


    Also, thank you for the link on dynamic ranges. That just blew my mind and will totally help with so many other spreadsheets I have.

    TY
    OVacctng

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Narrowing or Expanding Questions listed based on category(s) chosen

    Take a look at how I had to reorganize the data. Source data for pivot tables is 180 degrees out of phase with the way you would organize data for a database. With the database, you would have a main table with the categories and a subordinate table in a many to one relationship with the main table for the questions. In a database, you would not duplicate the categories on every record. This process is called normalization.

    With data for use with a pivot table, you have to "denormalize" the data, so the category gets repeated on every record.

+ 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. Need to consolidate worksheets based of values listed under a name
    By talltxn33647 in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 11-12-2015, 11:13 PM
  2. Replies: 4
    Last Post: 03-31-2015, 11:40 AM
  3. [SOLVED] Bringing back values based upon a chosen value
    By levtweeney in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-20-2013, 03:21 AM
  4. Improvement: new category in the forum: "unsolved questions"
    By bebo021999 in forum Suggestions for Improvement
    Replies: 9
    Last Post: 02-05-2013, 08:02 AM
  5. Sum numbers based on a category of a category
    By mattjac in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-09-2012, 11:08 PM
  6. [SOLVED] Expanding sum based on months
    By Vibro in forum Excel General
    Replies: 5
    Last Post: 08-10-2011, 11:26 PM
  7. Dynamic graph based on chosen value
    By booo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2011, 02:45 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