6. Tables, Sorting and Filtering
6.2 Structured References
Read a formula by the records and fields it names
A teammate receives a practice order worksheet with one column of rupee amounts. They need both a sum across the whole list and a calculation for the current order. Two formulas can mention Amount and read entirely different groups of cells. A structured reference tells you which named Table, field and part of the Table supplies the values.
Use the fictional Dispatch data from the chapter overview. The order names and figures are invented. They help explain Excel's behavior and describe no actual Blinkit or Amazon Now data. For this lesson, name the Table tblOrders. If that name is already used in your workbook, use a separate practice copy so the formulas below point to the intended Table.
Make the reference match the question
- Whole field. In a report cell outside the Table,
=SUM(tblOrders[Amount])reads everything in the Amount data column. On the first ten records it gives ₹2,870. - One record. In a calculated column,
=[@Amount]*(1+GST_Rate)uses the Amount for the current row. The at sign indicates this row. The example rate is a fictional practice input, not actual tax guidance. - Part of the object. A formula can ask for the header, data body or Total Row using an item specifier. That choice affects the cells included even when the name of the column stays the same.
Read the brackets from the outside in
A structured reference can include a Table name, one or more column specifiers, and a special part such as the data body. A specifier marks the field or part you intend to use. Square brackets separate the markers so Excel can recognize the exact column name from the header row.
Identify the Table first
In tblOrders[Amount], tblOrders identifies the Table object. The object can be on another worksheet. The name is attached to the workbook's Table, separately from a worksheet title or a colored band of cells. If no Table named tblOrders exists, that expression has nowhere to find the field.
Identify the header text inside the next brackets
[Amount] selects the column named Amount. It normally returns the data portion of that column, excluding its label and optional Total Row. The column name is a label and can contain spaces. To ask for a spaced name from the current row, a common representation is [@[Order ID]]. The exterior brackets and at sign mark the current record, and the inner brackets enclose the precise label.
If punctuation in a header makes the syntax harder to read, let Excel insert the reference from a selection or choose it from formula suggestions in a client that supports them. Some special characters need additional brackets or an apostrophe escape inside the reference. A short, consistent heading can avoid that complexity. Use the actual header spelling the workbook shows.
Choose whether the formula must name the Table
Within the same Table's calculated column, a formula can use unqualified current-row references such as [@Amount]. Outside the Table, use a fully qualified reference with the Table name to identify the source. A summary on a separate sheet should not rely on an implicit current-row meaning. That report can name the complete field and use an appropriate summary or lookup operation.
One specific case is tblOrders[@Amount], which refers to the Amount cell at the formula's row intersection with the identified Table in a compatible context. Avoid using it on a summary sheet to mean “the order I am currently viewing.” A workbook cell's position is not a selected order identity. Use an ID-based retrieval formula or an explicit named field when that is the intended relationship.
Choose which part of the Table belongs in the formula
A Table can have labels, records and one optional Total Row. For a count of order records, the useful population is the data body. For a caption in another cell, you might want the name from a header. Use a part specifier to keep those intentions readable.
| Expression | Cells selected | Useful check |
|---|---|---|
tblOrders[Amount] | Amount data cells only | Ten numeric values |
tblOrders[#Headers] | The Table header row | One row of field names |
tblOrders[#Data] | All data rows and all fields | Ten record rows |
tblOrders[#Totals] | The dedicated Total Row | One summary row when enabled |
tblOrders[[#All],[Amount]] | Header, data and enabled total for Amount | Twelve cells in one column |
tblOrders[[Qty]:[Amount]] | Adjacent data fields from Qty through Amount | Two columns in the Dispatch fixture |
Use [[#Headers],[Amount]] after the Table name to request one header cell; use [[#Data],[Amount]] to state the body explicitly. The outer brackets enclose the combined choices. For the beginner lab, prefer the short form when you want the regular data column. Use the more specific form only when the part is important to the result.
Lab 1 · Use the current record and one shared practice rate
Use a new copy of the original ten Dispatch orders. Convert A1:I11 to tblOrders with its real headers. On a separate Settings sheet, put Practice rate in A2 and 5% in B2. Define the workbook-level name GST_Rate with Refers to set to =Settings!$B$2. The named ranges lesson shows how to create and check that definition. The percentage is for the classroom fixture only.
Check one row, then the whole calculated field
- Back on Dispatch, add the column Amount with practice rate in J1. Verify it is part of tblOrders. Use the Table sizing control if the extra column remains outside its previous boundary.
- In J2 type
=[@Amount]*(1+GST_Rate). Current-row Amount supplies 64. The named value supplies 0.05. The result is 64 times 1.05, or ₹67.20. - Inspect the next data rows. A calculated column can fill automatically. Check actual formulas and use a supported fill action if necessary for the exercise. BLK-1002 should give ₹283.50 from 270, and AMN-1003 should give ₹115.50 from 110. The text of the row references is the same, and each formula reads its own amount.
- On a separate Checks sheet, compare
=SUM(tblOrders[Amount])and=SUM(tblOrders[Amount with practice rate]). Their outputs are ₹2,870 and ₹3,013.50. For this fixture you can verify the second by multiplying the first by 1.05. The lab has no separate per-line rounding step beyond the corresponding displayed amounts.
| Order | Numeric amount | At 5% | At 8% |
|---|---|---|---|
| BLK-1001 | 64 | 67.20 | 69.12 |
| BLK-1002 | 270 | 283.50 | 291.60 |
| AMN-1003 | 110 | 115.50 | 118.80 |
| BLK-1011 after adding | 367 | 385.35 | 396.36 |
Test an additional record and a separate assumption change
- Add the same practice order BLK-1011 used in the overview with amount 367, City Pune and Status Delivered. Enter the whole row from that exercise and confirm it joined tblOrders. The new amount-with-rate cell gives ₹385.35 when the rate is 5%.
- Check the two summaries. Base gross becomes ₹3,237. The sum with the five-percent input becomes ₹3,398.85. The input references did not change names. The membership and calculated column changed to include the extra order.
- Set Settings B2 to 8% and check the table values from the last column above. Base gross stays ₹3,237 because the Amount column is the underlying source. Its adjusted summary becomes ₹3,495.96. Restore 5% after verifying the step.
- In a spare report cell, use
=SUMIFS(tblOrders[Amount],tblOrders[City],"Pune"). For the original ten rows, Pune gives ₹544. With BLK-1011 inside the Table, Pune gives ₹911. The sum and criteria references read aligned columns from the same Table. Add a Delivered criterion to verify ₹691 for that group after the append.
Read the new row and the shared rate separately
Take a value from the current row
On BLK-1001, the @ reference resolves to 64. It supplies this one record's amount.
Read the shared assumption
The defined rate resolves to Settings B2. Every row uses that named input. With 5%, the first adjusted amount is ₹67.20.
Add the new member
When the ₹367 order joins the Table, its own @ reference reads 367 and the same rate returns ₹385.35.
Change only B2
At 8%, the adjusted amount for the new order is ₹396.36. The base total is unchanged. The original amount source and the shared rate have separate roles.
Audit how the formula moves when the worksheet changes
Adding a Table row changes the cells represented by the data reference. Renaming a column changes its label and Excel updates ordinary structured references in the workbook. Moving a formula, copying it and filling it can have different effects on its column specifier. Identify the operation you are testing before concluding a named reference is fixed or relative.
Distinguish copying from filling
Microsoft documents that copying a formula leaves its structured references the same. A fill action can adjust fully qualified column specifiers like a series, especially when you drag across columns. Ordinary filling up or down without a modifier leaves those column specifiers unchanged under the documented behavior. This is why copying an example to another report cell and dragging it sideways can produce different results.
Use the lab below to compare two otherwise equal actions. Read the actual reference after each. Some clients differ in the commands and handles they expose. If you need an invariant reference for a small report, enter or select the exact intended table column in each target formula and verify it. A caption should tell which field the result reads.
Lab 2 · Compare data-only, header and Total Row references
Use a fresh workbook with the original ten orders. Convert the known area A1:I11 to a Table named tblOrders. Keep the header visible. Put the checks below on a separate tab called RefChecks so filters and changes to the Table row positions do not hide your report cells.
Read each portion in its own cell
- Try
=ROWS(tblOrders[#Data]). It gives ten. Then use=ROWS(tblOrders[#Headers])and expect one. The header may have nine fields, and ROWS asks how many rows it occupies. - Enter
=tblOrders[[#Headers],[Amount]]. The single returned cell gives the text Amount. This can be useful when a report needs to reference the chosen field label. - Check
=COLUMNS(tblOrders[[Qty]:[Amount]]). The two fields are adjacent in this dataset, so the answer is two. The colon between their column labels denotes a range. This is a structural test and does not combine a count with a rupee value. - Use
=ROWS(tblOrders[#All])without a Total Row and expect eleven, because the header and ten data rows are present. Enable the Total Row in the Table's design options and recheck. The result becomes twelve. The data row count remains ten.
Prove the effect of including a summary twice
On the Total Row, choose Sum for Amount and verify that its visible summary is ₹2,870 in the all-visible starting state. Check its generated formula. In a report cell on RefChecks, =SUM(tblOrders[Amount]) gives ₹2,870 because it reads only the data. A deliberately different formula, =SUM(tblOrders[[#All],[Amount]]), gives ₹5,740 in this state. It reads the ten amounts and the same amount already summed in the Total Row. SUM skips the text header. This double-counted result is an effective test of why scope matters.
Use =tblOrders[[#Totals],[Amount]] only when your intended report is to display the Table's existing total cell. It reads that summary as entered. Its value can change when the Total Row formula responds to a filter. An all-data sum is an independent calculation. On a scratch copy, compare these two references with an active Pune-and-Delivered view. If your Total Row uses a visible subtotal, it reads ₹324, while SUM over the data keeps ₹2,870.
Read what a copy or fill changed
- On RefChecks, put
=SUM(tblOrders[Qty])in B8. The original quantities sum to twenty-four. The next data column to the right of Qty in Dispatch is Amount. - Copy B8 and paste to C8 using the normal formula copy, keeping both cells outside the Table. Inspect C8. The structured field remains Qty and the result is still twenty-four.
- Clear C8, and, in an Excel client with a fill handle that supports the documented action, drag from B8 to C8. Inspect the formula itself. For the fully qualified reference filled to the right, the column specifier can advance from Qty to Amount. If it does, C8 returns ₹2,870 instead of twenty-four.
- Give the two measures distinct labels once you know which result is intended. If your client's fill command did not perform the horizontal series adjustment, enter the two references deliberately and compare them. The important check is the field actually shown in the resulting formula.
Read a reference independently of the current view
A Table's data column is the same set of data rows after you filter it. A structured reference can move as membership changes by adding or removing rows. By itself it does not limit the data to visible rows. You need a function such as SUBTOTAL when visibility is the condition.
Sort the Table and inspect one row's formula. Its current-row references name fields on the same record after the sort. Check that the ID, Amount and derived result are still together. A report that reads the full amount column gives the same sum if only the order changed. Filters and sorting affect the view, while a deliberate append changes the set of source records.
Keep identifiers separate from positional row assumptions
In the calculation column, the current row's Amount is exactly the intended value. A separate report may ask for the amount for BLK-1001 regardless of how the records are sorted. The current-row selector on its own does not find that ID, because it reads position. Use a keyed lookup or an intentional criterion across the ID column to find that record in a reusable report. Verify the source has one ID for each record expected by the lookup.
Migrate an address-based report one formula at a time
Suppose a fictional Amazon seller originally used a report cell containing =SUM(Dispatch!G2:G11). Creating a Table over the data does not automatically rewrite that old formula as a structured reference. The old formula still works as written. If the new requirement is to follow every confirmed Table row, update the intended summary and verify it against the original sample before applying any edits to the rest of the report.
Use a table-aware formula only where membership should follow
- Keep a starting copy with the old ten rows and make a separate result using
=SUM(tblOrders[Amount]). When both calculations cover the same ten intended records, verify they agree for that known population. The original unfiltered ten-row sample gives ₹2,870. - Add the new record after you know its amount. Check the original coordinate formula in an ordinary copy and the structured formula in the Table copy. The old example intentionally stops at G11. The structured one reads the new amount once row 12 joins the Table.
- Label the old result as the original batch if it still has a genuine purpose. A fixed range is helpful when another person needs to reproduce an approved snapshot from the same preserved rows. Choose a references strategy for each measure rather than replacing all addresses mechanically.
- Review dependent formulas such as an average, chart source or PivotTable. A changed worksheet formula does not automatically prove that every other template or linked report uses the same population. Inspect the specific source and refresh behavior for each one.
Converting a Table back to a range can convert its structured references into equivalent ordinary cell references. That process changes how a later append is handled. The previous lesson uses a separate workbook copy to verify this change. The meaningful test is what each formula reads after the conversion, not just whether today's total looks familiar.
Practice extension · mix a current row and a whole column
In the original ten-order workbook, a teammate asks what share of the gross listed amount comes from each order. The numerator should read the current order. The denominator should read all Amount data cells in the Table. A single calculation can intentionally combine both scopes. Keep this practice field separate from any adjusted amount-with-rate results.
Build the row-share calculation and check its denominator
- Place a new Share of gross listed column inside tblOrders. In the first data cell, enter
=[@Amount]/SUM(tblOrders[Amount]). The at sign marks a single numerator value. The named column inside SUM describes the whole denominator. - Set a readable percentage display. BLK-1001 uses 64 divided by 2,870 and shows about 2.23% with two percentage decimals. BLK-1007 uses 1299 divided by the same 2,870 and shows about 45.26%. Verify the raw source for each row and the unchanged denominator.
- Check the full share column by summing it outside the Table. With valid numeric amounts and no intermediate rounding, the shares should total 100%, subject to normal floating-point display. Adding the individually displayed rounded percentages by hand can produce a small display difference. Verify the stored values for the actual check.
- Append and verify BLK-1011 in a practice copy. The denominator becomes 3,237. The original order of ₹64 has not changed, and its share becomes about 1.98%. Explain the result using the new population. A change to the total can affect every row's share without altering any original row amount.
Filter the original Table to Pune while keeping the gross formula in place. A filtered report can still show the share each visible order contributes to all listed amounts. If the requested measure instead means share within the visible group, that needs a different denominator and visibility rule. Label the formula's scope before sharing a screenshot of a filtered worksheet.
Maintain references when a name or header changes
Consider an Orders Table shared with another reporting team. They want to rename Amount to Listed Amount to make its purpose clearer. A normal structured formula can update when you rename the real column through the Table. Before trusting the follow-on reports, run the same ten-row total check in a test copy.
- Use the formula bar to record the original summary,
=SUM(tblOrders[Amount]), and its result of ₹2,870. Check any additional explicit selectors that name the Amount header or Total Row. - Rename the Table's actual Amount header to Listed Amount. If you watch the summary, its structured reference should change to the new field label. Check the output remains the same because the record values are unchanged.
- Write a new formula after the rename. Use the header as it appears today or let a supported selection insert the reference. An old copied text string containing the previous field name is not guaranteed to become a current reference automatically when pasted.
- Check the destination workbook separately if you copy a formula there. A Table name belongs to a specific workbook. Microsoft documents limitations for linked Table references to closed source workbooks. When you need a handoff that can be checked independently, keep the appropriate source available or produce a separate verified values-only export.
That same distinction is useful when the Table style hides the header row. Ordinary named column references can keep working even while the header display is off. A reference specifically asking for #Headers requires the visible header portion and can return a reference error in this state. Restore the header or use a separate caption if the report needs text independent of the Table's display settings.
Write a report with fixed Table fields and changing criteria cells
On a separate scratch sheet, put Pune in A2 and Nashik in A3. Put Delivered in C1. The report will read the same Table columns for both results. The city criterion should move down with the report row, while the status setting should stay in C1. Structured references and ordinary cell references can work together in the same expression.
=SUMIFS(tblOrders[Amount],tblOrders[City],A2,tblOrders[Status],$C$1)
- Enter the expression in B2 using the original ten-row fixture. It should return ₹324. The amount field comes first, and the criteria pairs use the City and Status fields from the same Table.
- Fill B2 down to B3 using the usual vertical fill. Check that A2 became A3 and the status reference stayed fixed at C1. Under the standard vertical fill action, the fully qualified source field names remain the same. B3 now gives ₹360 for Nashik delivered.
- Change C1 to Cancelled in a practice copy. Pune now returns ₹220 and Nashik returns zero because it has no cancelled rows in this dataset. Inspect both grouping results. The fixed C1 address changes its value without changing its location.
- Put Delivered back. If you then append BLK-1011 to the Table, Pune becomes ₹691 and Nashik stays ₹360. An absolute status address and fixed field names do not freeze the referenced Table's record membership.
This is a repeatable way to read a report formula: state the data scope, ask which criteria are fixed or moving, and trace a known qualifying row. One result can keep the same Table columns while the report cells move to another city. The chosen bracket reference names a field and does not do the job of anchoring a separate criterion cell.
Diagnose a structured formula by checking one component
If a formula gives the wrong value after someone edits the Table, start with the object, then inspect the field and selected part. A recognized Table name can still be attached to the wrong collection. A correctly spelled column label can still use the wrong selector. Check each component beside a known starting result.
- Wrong Table. Click the intended object and read its name. Confirm the object lives in the expected workbook. If several tabs contain similar orders, a local test count helps you identify which data you are reading.
- Wrong header. Look at the actual header text. A trailing space or a changed label can make a typed structured reference difficult to resolve. Let Excel insert the reference in a supported client and verify the resulting formula.
- Wrong part. If a grand amount doubled, check whether
#Allincluded an existing Total Row instead of only the source data. If the formula reads a Total Row cell, inspect that cell's calculation and active filters. - Wrong context. Put the current-row selector in its intended data row. Special row choices such as
#This Rowand@refer to a current-row intersection. Microsoft notes that a one-data-row Table can retain the longer syntax, and recommends testing calculated formulas with more than one record. - Unexpected result shape. A direct reference returning a whole column can offer many values in a supported dynamic-array grid. Use a compatible aggregation if the task needs one sum. A spill result belongs outside the Excel Table when it needs neighboring cells.
- Unexpected copy behavior. Compare the original reference with the filled result. A rightward fill can shift fully qualified columns. An ordinary copy preserves the structured reference. Ordinary cell references within the same formula have their own relative and absolute rules.
Maintain one small input and output proof for each result. For this chapter, a known order code and a known gross total tell you whether the single-row and whole-table references are behaving. Add a documented test when the user needs a different part, such as a label or current visible summary.
Check what a range of named columns includes
The colon between two bracketed Table fields describes adjacent columns from the first through the last, including any column between them. In the Dispatch fixture, Qty is immediately followed by Amount, then Mins. The reference tblOrders[[Qty]:[Mins]] therefore covers three fields. The intent is a field span, while tblOrders[Amount] identifies one exact field.
- Outside the initial Table, use
=COLUMNS(tblOrders[[Qty]:[Mins]])and check the result three. Use=ROWS(tblOrders[[Qty]:[Mins]])and check ten. The expected shape is ten rows by three columns. A numeric sum of the span would mix units, rupees and minutes, so these structural tests are more informative. - In a disposable copy, insert one new Table column between Qty and Amount and give it a clear heading such as Source note. The endpoints Qty and Mins still name the same fields. There is now an extra intermediate field in the selected span. Inspect the formula and verify COLUMNS returns four.
- Verify that
=SUM(tblOrders[Amount])still returns ₹2,870. It names one field instead of describing a span and should continue to read that one field. Check the known first and last amounts after the structural change. - Restore the original column order or keep the changed version explicitly labelled. A later calculation might expect exactly three adjacent fields. Save its expected shape and the intended output field names so a structural change can be detected early.
These checks can also help when placing dynamic formulas outside a Table. A direct reference that spills multiple fields can occupy more columns after an insertion. Keep sufficient space and inspect the actual width. If a report requires selected nonadjacent fields, build a formula or source selection that expresses those chosen fields rather than using a span that silently admits new ones.
The underlying question is whether the formula should follow a single field, a set of records or an interval of columns. Record the intended behavior before testing an insertion. A successful formula can return the wrong width when its selectors describe a broader group than the reader expected.
Apply the same caution to conditional summaries on two separate Tables. An Amount column in one Table and a City column in another may be the same length and still describe different records at each position. For the city report, both fields should come from the same Table so their alignment follows the order rows. If the second source supplies an attribute you need, match it by an approved unique key before applying the condition. Verify one record's identifier, city and amount together.
Quiz · identify which cells are read
What does tblOrders[Amount] refer to?
It refers to the Amount data cells in tblOrders. It leaves out the header and the separate Total Row. For the initial ten orders, SUM of that reference is ₹2,870.
Why can the same row formula give ₹67.20 and ₹283.50 on different rows?
The @ part reads each row's own Amount and the rate name reads the same workbook input. The first two source amounts are 64 and 270. Multiplying each by 1.05 gives different numeric results.
Which reference should you use to retrieve the existing Total Row's Amount result?
Use tblOrders[[#Totals],[Amount]] when that row is present. It returns the summary cell the Table already calculates. It will reflect the logic in that cell, including visibility when the total is a subtotal.
Why did summing the entire Amount part return ₹5,740?
With all rows visible, the data sum and the Total Row each hold a total of ₹2,870. The all-parts reference includes the data values and that summary, so it counts the same money twice.
What can happen when you fill a structured formula to the right?
A fully qualified column specifier can move to a neighboring Table column. In the lab, a rightward fill can change Qty to Amount. A normal copy of the formula preserves the structured reference. Inspect the actual field after either operation.
Can an outside report rely on @ to mean a selected order?
The symbol selects an appropriate current-row intersection. It does not look up the selected ID. Use the full Table field with a lookup or criterion when the report must find a specific order by its identity.
Interview practice · distinguish the scopes
How would you explain the bracket pieces in a structured reference?
The Table name identifies the object. A column field inside brackets selects a particular labeled field. A special item like #Totals selects a part of the object. I would check the referenced data with a small sample.
How would you replace a static total with one that grows?
I would create a Table around the intended records, use a structured data-only column reference in a separate test total, and verify the values agree. Then I would append a known row, confirm membership and check the result changed by that row's amount.
How can a conditional report move down while table ranges stay stable?
I would use named fields from the source Table for the tested and summed ranges. I would let the report's city cell reference move with its row and fix a shared status input when needed. I would inspect the first filled result and one later row.
Why can a Table sum differ from the Total Row while a filter is active?
A sum over the Amount data column reads all records. The Total Row may contain a visible-only SUBTOTAL. I would label both values and verify their distinct populations on the same fixture.
How would you verify a rename was safe?
I would record the expected value and original field, rename on a scratch copy, and confirm the standard structured reference now uses the new name and returns the same sum. I would check other reports that refer to the data separately.
Six cards for reading named references
- Object Use the exact Table name when referring from outside it.
- Field A table column specifier reads the column with that header. The simple named field targets data cells.
- Current row Use @ with a chosen field to read the current record inside its data row.
- Parts Choose #Headers, #Data, #Totals or #All according to the group of cells you need.
- Fill Inspect whether the field changes during a horizontal fill. Copy and fill can behave differently.
- Proof Reconcile a known cell and a known aggregate, then check one membership or naming change.
Continue with the Total Row to verify a visible summary. Revisit creating a Table if the workbook has similar-looking ranges with different memberships.
Microsoft references
Continue practising: explore the existing Excel Task Hub for additional exercises.