Keeping up with changed cell references used in calculations in other cells in refreshed pivot table

%3CLINGO-SUB%20id%3D%22lingo-sub-1878384%22%20slang%3D%22en-US%22%3EKeeping%20up%20with%20changed%20cell%20references%20used%20in%20calculations%20in%20other%20cells%20in%20refreshed%20pivot%20table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1878384%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20create%20a%20pivot%20table%20from%20a%20daily%20downloaded%20Excel%20sheet%20that%20is%20in%20reality%20a%20simple%20table%20containing%20rows%20of%20stock%20positions%20sorted%20by%20account.%20The%20number%20of%20rows%20for%20each%20account%20will%20change%20according%20to%20added%20or%20deleted%20positions.%20I%20have%20a%20pivot%20table%20that%20organizes%20the%20data%20by%20a%20%22short%20name%22%20for%20each%20account%20and%20subtotals%20the%20value%20of%20the%20account.%20I%20need%20to%20add%20columns%20that%20determine%20the%20percent%20of%20the%20subtotal%20in%20each%20position%2C%20calculate%20a%20threshold%20percent%20position%20limit%2C%20calculate%20over%20allocations%20above%20that%2C%20and%20specify%20position%20reduction%20amount%20of%20the%20over-allocation.%20These%20depend%20on%20the%20short%20name%20field%20subtotals.%20The%20problem%20is%20that%20as%20the%20PT%20is%20refreshed%20with%20a%20new%20download%20that%20has%20more%20or%20fewer%20positions%20(rows)%20in%20an%20account%2C%20it%20changes%20the%20cell%20reference%20for%20the%20subtotal%2C%20while%20the%20added%20column%20calculations%20refer%20to%20the%20old%20cell%20reference.%20And%20the%20calculation%20cells%20may%20shift%20to%20rows%20related%20to%20another%20account%2C%20so%20the%20values%20on%20that%20row%20may%20now%20refer%20to%20a%20different%20short%20name%20grouping%2C%20or%20a%20non-subtotal%20row.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20provide%20a%20dynamic%20cell%20reference%20to%20the%20percentage%20calculations%20which%20keeps%20up%20with%20the%20new%20subtotal%20location%20and%20checks%20that%20it%20is%20in%20the%20same%20short%20name%20grouping.%20A%20small%20section%20of%20the%20spreadsheet%20is%20attached.%20The%20%24F%2410%20reference%20in%20column%20P%20is%20to%20the%20field%20subtotal%3B%20the%20second%20%24A%243%20in%20Q%20is%20to%20the%20Short%20Name%20cell%20which%20occurs%20only%20on%20the%20first%20line%20of%20the%20field%20grouping.%20Each%20of%20these%20references%20will%20change%20if%20rows%20are%20added%20or%20subtracted%20from%20the%20source%20table%2C%20and%20the%20new%20reference%20need%20to%20be%20used%20in%20the%20subtotal%20percentage%20calculations.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20do%20this%3F%20Thanks!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1878384%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBI%20%26amp%3B%20Data%20Analysis%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1879256%22%20slang%3D%22en-US%22%3ERe%3A%20Keeping%20up%20with%20changed%20cell%20references%20used%20in%20calculations%20in%20other%20cells%20in%20refreshed%20pivot%20t%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1879256%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F865898%22%20target%3D%22_blank%22%3E%40JRClev%3C%2FA%3E%26nbsp%3BYou%20don't%20share%20the%20real%20pivot%20table%20with%20us.%20Just%20some%20pasted%20values.%20Thus%2C%20the%20GETPIVOTDATA%20formulae%20are%20broken.%20But%20never%20mind.%20If%20you%20want%20to%20calculate%20the%205%25%20position%2C%20you%20don't%20need%20to%20reference%20the%20subtotal%20in%20F10.%20A%20formula%20like%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DF3%2FO3*5%25%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Ein%20P3%20(and%20copied%20down)%20will%20do%20that%20trick.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

I am trying to create a pivot table from a daily downloaded Excel sheet that is in reality a simple table containing rows of stock positions sorted by account. The number of rows for each account will change according to added or deleted positions. I have a pivot table that organizes the data by a "short name" for each account and subtotals the value of the account. I need to add columns that determine the percent of the subtotal in each position, calculate a threshold percent position limit, calculate over allocations above that, and specify position reduction amount of the over-allocation. These depend on the short name field subtotals. The problem is that as the PT is refreshed with a new download that has more or fewer positions (rows) in an account, it changes the cell reference for the subtotal, while the added column calculations refer to the old cell reference. And the calculation cells may shift to rows related to another account, so the values on that row may now refer to a different short name grouping, or a non-subtotal row.

 

Is there a way to provide a dynamic cell reference to the percentage calculations which keeps up with the new subtotal location and checks that it is in the same short name grouping. A small section of the spreadsheet is attached. The $F$10 reference in column P is to the field subtotal; the second $A$3 in Q is to the Short Name cell which occurs only on the first line of the field grouping. Each of these references will change if rows are added or subtracted from the source table, and the new reference need to be used in the subtotal percentage calculations.

 

Is there a way to do this? Thanks!

 

1 Reply

@JRClev You don't share the real pivot table with us. Just some pasted values. Thus, the GETPIVOTDATA formulae are broken. But never mind. If you want to calculate the 5% position, you don't need to reference the subtotal in F10. A formula like:

=F3/O3*5%

in P3 (and copied down) will do that trick.