ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calculated Field - vLookup (https://www.excelbanter.com/excel-programming/447807-calculated-field-vlookup.html)

KVJS

Calculated Field - vLookup
 
Getting error message "References, names and arrays are not supported in pivot table formulas"
When entering vLookup in a pivot table calculated field.
Example:
Name: TblLu
Formula: =vlookup(Re_Num,newrates,34,false)

Please help.
Thanks,
Ken

Spencer101

Quote:

Originally Posted by KVJS (Post 1607909)
Getting error message "References, names and arrays are not supported in pivot table formulas"
When entering vLookup in a pivot table calculated field.
Example:
Name: TblLu
Formula: =vlookup(Re_Num,newrates,34,false)

Please help.
Thanks,
Ken

Hi Ken,

Is "Re_Num" in your workbook a single cell or a range of cells?

KVJS

Quote:

Originally Posted by Spencer101 (Post 1607913)
Hi Ken,

Is "Re_Num" in your workbook a single cell or a range of cells?

Hi Spencer,
A single cell.
All I am trying to do using an Item Id is read a table and display info from that table. Re_Num is simply the item Id.
Thanks,
Ken

Ben McClave

Calculated Field - vLookup
 
Ken,

It is my understanding that PivotTable Calculated Fields cannot use any formula that requires a range as one of its arguments. There are a few ways to work around it. Here are a couple of suggestions:

1. Use the CHOOSE function. If you have 29 or fewer lookup items, you could use the CHOOSE function to select the appropriate item from the list.

2. Add a column to your source data. If you are able, simply add a column to the table that feeds your PivotTable and use the VLOOKUP within that column instead. Then, that new column will be available to add as a field to your PivotTable.

3. Use the GetPivotData function. To use this option, simply use the VLOOKUP in a range of cells outside of the PivotTable and use GetPivotData to pull in any data needed from the PT.

None of these may be ideal for your needs, but hopefully one of them will work out.

Ben


All times are GMT +1. The time now is 01:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com