ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Pivit Tables (https://www.excelbanter.com/excel-worksheet-functions/147454-pivit-tables.html)

David A.

Pivit Tables
 
I have a vlookup that is searching a Pivot table. The proble is that every
morning the pivot table updates and adds a new column of data. This makes my
vlookup error out because its looking in the wrong column. How do I tell my
vlookup to look for a column with a heading OR tell it to look in the last
column with data in it?

Thanx,

vezerid

Pivit Tables
 
If you search for a heading, use a VLOOKUP that has many columns in
the 2nd argument.

=VLOOKUP(value,A:Z,MATCH(heading,A1:Z1,0),0)

For the last column:

=VLOOKUP(value,A:Z,COUNTA(A1:Z1),0)

HTH
Kostis Vezerides

On Jun 21, 6:29 pm, David A. wrote:
I have a vlookup that is searching a Pivot table. The proble is that every
morning the pivot table updates and adds a new column of data. This makes my
vlookup error out because its looking in the wrong column. How do I tell my
vlookup to look for a column with a heading OR tell it to look in the last
column with data in it?

Thanx,




Debra Dalgleish

Pivit Tables
 
You can use the GETPIVOTDATA function to extract data from the pivot
table. There are instructions in Excel's Help, and he

http://www.contextures.com/xlPivot06.html

David A. wrote:
I have a vlookup that is searching a Pivot table. The proble is that every
morning the pivot table updates and adds a new column of data. This makes my
vlookup error out because its looking in the wrong column. How do I tell my
vlookup to look for a column with a heading OR tell it to look in the last
column with data in it?

Thanx,



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html



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

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