+ Reply to Thread
Results 1 to 2 of 2

Referencing a range within a pivot table field(s)

  1. #1
    Registered User
    Join Date
    02-01-2024
    Location
    Boston, MA
    MS-Off Ver
    Excel 16
    Posts
    2

    Referencing a range within a pivot table field(s)

    Hi all.

    I am working on a spreadsheet of survey data. The survey asks respondents a number of questions to gauge their retirement readiness and confidence in health and finance. The end goal is to see which questions were answered the most confidently and least confidently. In the attached screenshot, you will notice I have lines to the right of the pivot pulling the % of people who responded negatively and positively to a question. I then sort these out to the far right.

    Two Questions:

    Is it possible to reference an array under a specific pivot field?

    Example: in the screenshot, I'm looking to pull the % for those who answered 'no' and 'yes' with =VLOOKUP("No",A3:B5,2,FALSE))

    I'm currently referencing a range of absolute cells (A3:B5). The issue is that in the future, when I paste new raw data as more respondents take the survey, I will likely need to manually edit some cells for other questions below to fit the formulas looking for yes and no answer percentages. Is there a way to reference the pivot table fields Questions and Responses with =GETPIVOTDATA?

    In plain English, my formula would be =VLOOKUP("No" in Pivot Table Range Q1:Responses"). This way, no matter how many rows Q1 responses may or may not contain in the future, it will provide me with the percentage of No's or Yes's.

    2. My team has decided that a non-confident answer (for now) will be the responses containing "no" and "sort of." There are some Questions that don't contain any of the particular response options. In my screenshot, I have a column summing the Sort Ofs and Nos. But I am getting a #NA because of the lack of an If OR statement. When the cell in the sort of + no column tries to sum the two, the formula fails if one of them doesn't exist in the responses for that particular question. Currently, the formula reads:

    =SUM(VLOOKUP("Sort of",A812:B814,2,FALSE),VLOOKUP("No",A812:B814,2,FALSE))

    What would this look like as an If OR statement?

    Happy to clarify anything. Many thanks in advance!
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Referencing a range within a pivot table field(s)

    In the attached file I converted a Pivot Table into a cub formula using OLAP tool.

    For more about this kind of conversion see the video bellow.
    Excel CUBE Functions can do everything a PivotTable does and more!
    Attached Files Attached Files

+ 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: 12-05-2019, 03:47 AM
  2. Replies: 0
    Last Post: 08-15-2016, 02:07 PM
  3. Referencing a subtotal range in a pivot table
    By inspector-71 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-11-2014, 11:58 AM
  4. Formula IF exist in Pivot Table field and in a Named Range
    By QcSylvanio in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 04-18-2013, 02:46 PM
  5. Replies: 0
    Last Post: 06-26-2012, 09:06 PM
  6. Replies: 3
    Last Post: 03-03-2012, 12:16 PM
  7. Replies: 0
    Last Post: 09-27-2005, 11:05 AM

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