Forum Discussion
Structured Reference to Specific Cell in Table
I am trying to reference a specific cell in a table from either a separate cell in the same table or a separate sheet in the same workbook, but not from the same row. For example, using the (slightly modified) sample data from https://support.microsoft.com/en-gb/office/using-structured-references-with-excel-tables-f5ed2452-2337-4f71-bed3-c8ae6d2b276e, I might want to make a separate sheet with a table of average sales by region.
| Region | Average Sales |
North | =(C2+C7)/2 |
| South | =(C3+C9)/2 |
| East | =(C4+C5)/2 |
| West | =(C6+C8)/2 |
However, I would like to use structured references to improve the resiliency of my formulas. Notice that I cannot use Index for 'East' because I have East 1 and East 2. Is there another way to call a specific cell from a table in a formula? For instance, instead of C4, can I somehow call Dan's Sales Amount, such that if I add a row above 'Dan' or a column to the left of 'Sales Amount', or simply re-sort the data such that I have it descending by sales amount, my formula still works?
| Sales Person | Region | Sales Amount | % Commission | Commission Amount |
Joe | North 1 | 260 | 10% | |
Robert | South 1 | 660 | 15% | |
Dan | East 1 | 870 | 12% | |
Michelle | East 2 | 940 | 15% | |
Erich | West 1 | 410 | 12% | |
Dafna | North 2 | 800 | 15% | |
Jeff | West 2 | 770 | 12% | |
Rob | South 2 | 900 | 15% |
2 Replies
- Detlef_LewinSilver Contributor
- mtarlerSilver ContributorI think you want to use XLOOKUP or FILTER functions.
C4 for Dan's Sales would be
=XLOOKUP("Dan",Table1[Sales Person],Table1[Sales Amount], "not found")
while averages for East could be
=AVERAGE(FILTER(Table1[Sales Amount], LEFT(Table1[Region],4)="East",0))