0

I am using xLookup to pull some data out of a pivot table. Currently my formulas look like this:

=XLOOKUP($A2,'RecT'!$A$5:$A$30,'RecT'!$C$5:$C$30,0)

But in my pivot table, column A is called Grade and Column C is called Confirmed. It would be much easier to read the formulas if the column header/name were used to refer to the data.

Is there some version of the formula that will look more like:

=XLOOKUP($A2,PIVOTTABLENAME[[#Values],["Grade"]],PIVOTTABLENAME[[#Values],["Confirmed"]])

(I made up that syntax - I know it doesn't work)

4
  • If you use XLOOKUP you can click the data column (excluding header) and you'll see what it's refered as. Kinda similar to what you're asking. Commented Oct 13, 2022 at 20:51
  • That does sound like what I am trying to do, but I can't figure out where to click in the pivot table. Commented Oct 13, 2022 at 21:20
  • 1
    Have you looked into excel function GETPIVOTDATA()? Commented Oct 14, 2022 at 0:26
  • I mistaken Table with Pivot Table. Commented Oct 14, 2022 at 7:44

1 Answer 1

1

Please see situation below:

GetPivotData

If you want to retrieve data meeting conditions of A12 and B12 you could use the following formula in C12:

=GETPIVOTDATA("C",$G$1,"A",A12,"B",B12)

This looks for the values in the Pivot Table in column with values of table header named C from the original table.

$G$1 being the cell the table is stored.

It looks for the values where the values in data column named "A" equals the value in A12 and values in data column named "B" equals the value in B12.

Change it to your needs.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.