+ Reply to Thread
Results 1 to 2 of 2

Variable col_index_num in vlookup

  1. #1
    Hugh Murfitt
    Guest

    Variable col_index_num in vlookup

    I have a pivot table with catalogue items in the left hand column and a Grand
    Total column which, depending on the data in the pivot table, could be any
    number of columns to the right.
    How do I always show the Grand Total for each item, regardless of the number
    of columns I have?
    I have tried vlookup, allowing for the largest conceivable table array, but
    need to vary the col_index_num depending on where Grand Total is. How can I
    find this?
    (I’m not allowed to use macros and I can’t get my hands on the raw data to
    manipulate it before it’s put in the pivot table.)
    Thanks for any help. I love all you helpful people!!

  2. #2
    Hugh Murfitt
    Guest

    RE: Variable col_index_num in vlookup

    If anybody's interested, I've cracked this...

    Use the Match function in combination with Vlookup
    Assuming the lookup_value is in Column A, the Pivot Table is on a separate
    sheet called PivotTable, and the heading for the Grand Total column will
    appear in row 5 of this sheet,
    =VLOOKUP(A1,PivotTable!$A$1:$O$50,MATCH("Grand
    Total",PivotTable!$A$5:$Z$5,0),TRUE))

    "Hugh Murfitt" wrote:

    > I have a pivot table with catalogue items in the left hand column and a Grand
    > Total column which, depending on the data in the pivot table, could be any
    > number of columns to the right.
    > How do I always show the Grand Total for each item, regardless of the number
    > of columns I have?
    > I have tried vlookup, allowing for the largest conceivable table array, but
    > need to vary the col_index_num depending on where Grand Total is. How can I
    > find this?
    > (I’m not allowed to use macros and I can’t get my hands on the raw data to
    > manipulate it before it’s put in the pivot table.)
    > Thanks for any help. I love all you helpful people!!


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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