I have an Excel 2010 pivot table where WEEK and TITLE are the Row Labels. For each of 5 WEEKs there are X number of TITLES. As new weeks are rotated in and out (rolling time frame) the cell ranges for each WEEK’s data change. I’m looking for a way to identify each row of the Pivot Table that represents the WEEK subtotal.
I’m trying to do this because I have VLOOKUPs that reference each WEEK’s data. Currently I have to manually change the formula in each VLOOKUP to each WEEK’s cell range as old WEEKs are de-selected and new weeks are selected. I’d like to make my VLOOKUP formula dynamic, so as new WEEKS are selected the cell ranges are automatically adjusted.
Here is one of the VLOOKUP formulas I’m using:
=IFERROR(VLOOKUP($B342,$B$115:$AA$212,MATCH(C$6,$C$6:$AA$6,0)+1,FALSE),0) * VLOOKUP(C$6,Conversion!$A$3:$B$29,2,FALSE)
It is the first VLOOKUP cell range I am trying to make dynamic. One week the range can be B115-AA212, the next it can be B119:AA26. One possible solution I came up with is to use the MATCH function to identify each WEEK’s subtotal row, though I don’t know how to fit the MATCH function into the VLOOKUP formula.
Do you have any ideas? Thanks in advance for any thoughts/suggestions you may have.
I’m trying to do this because I have VLOOKUPs that reference each WEEK’s data. Currently I have to manually change the formula in each VLOOKUP to each WEEK’s cell range as old WEEKs are de-selected and new weeks are selected. I’d like to make my VLOOKUP formula dynamic, so as new WEEKS are selected the cell ranges are automatically adjusted.
Here is one of the VLOOKUP formulas I’m using:
=IFERROR(VLOOKUP($B342,$B$115:$AA$212,MATCH(C$6,$C$6:$AA$6,0)+1,FALSE),0) * VLOOKUP(C$6,Conversion!$A$3:$B$29,2,FALSE)
It is the first VLOOKUP cell range I am trying to make dynamic. One week the range can be B115-AA212, the next it can be B119:AA26. One possible solution I came up with is to use the MATCH function to identify each WEEK’s subtotal row, though I don’t know how to fit the MATCH function into the VLOOKUP formula.
Do you have any ideas? Thanks in advance for any thoughts/suggestions you may have.