I am not sure if it is even possible, but that I why I am reaching out to the masters of this forum.
Here is an example of the data:
I am trying to get the cells below the "Difference" section (which is just normal cells, no table or pivot table) to correspond to the headers from Pivot Table 1 (PT1) & Pivot Table 1 (PT2). Then subtract PT2 from PT1 figures for example matching A, C SOLD or D, S SOLD needs to match "Brand Name" only like A to A, B to B, etc. (99% of the time these will be on the same row, but there is a chance they are off a line). Round to 2nd digit beyond the period, otherwise be blank if no data from either table. However, the variable headers PT1 & PT2 is the issue I can't really seem to resolve. Sometimes for example there will be L SOLD in one Pivot, but not the other, as pointed out above.
Below is the code I have, this was allowing me to do just about everything, but only worked if I had all four SOLD columns in both tables.
=IFNA(ROUND(IF($G5="","",H5-INDEX(B5,MATCH($G5,$A5,0))),2),"")
Here is an example of the data:
A | B | C | D | G | H | I | J | L | M | N | O | ||
2 | Pivot Table 1 | Pivot Table 2 | Difference | ||||||||||
3 | Brand Name | C SOLD | L SOLD | S SOLD | Brand Name | C SOLD | S SOLD | C SOLD | R SOLD | L SOLD | S SOLD | ||
4 | A | 200.00 | A | 200.00 | - | ||||||||
5 | B | B | |||||||||||
6 | C | 500.00 | C | 500.00 | |||||||||
7 | D | 7,600.00 | D | 8,000.00 | (400.00) |
Below is the code I have, this was allowing me to do just about everything, but only worked if I had all four SOLD columns in both tables.
=IFNA(ROUND(IF($G5="","",H5-INDEX(B5,MATCH($G5,$A5,0))),2),"")