Ravindra BagaleCourses & study guides मराठी Track your progress

23. Formulas Across Sheets and Workbooks

Excel

23.3 Referencing an Excel Table on Another Sheet

Name the order source so the report can follow its rows

The City Summary you built for fictional Pearl Textiles reads two blocks of addresses on Orders. That approach works for the ten rows approved on a particular day. Now the shop wants to accept a new batch each week. At present you must check and extend the city range, amount range and count range each time. A better fit for this repeating job is a single Excel Table whose data rows are the approved orders. Let the report refer to the Table’s named columns. When the Table includes another approved order, all the formulas that read those columns can follow its membership.

An Excel Table is a named workbook object built on a rectangle of worksheet cells with column headings. Excel tracks fields and data rows for it. The sheet is still called Orders, so a person can find it by tab name. The Table is called tblMini, so the formula can find the source without an Orders! prefix. A structured reference names a Table and a part of that Table. Here tblMini[Amount] means the data cells in the Amount column. Your worksheet may display formatted currency while the header itself should be the exact text Amount.

  • Find the object before writing the formula. Click a source data cell and confirm Excel shows Table commands and the name tblMini.
  • Ask which rows the Table actually owns. A nearby row, a copied worksheet, or a note on the source sheet can be separate from the named data.
  • Check counts and amounts from the approved intake. A Table can expand to include wrong rows as easily as right ones. Inspect the source content as well as the formula.
Orders sheet contains the Table tblMini. City Summary uses tblMini Amount to read its data rows. The header, later notes, and any totals row are outside that data-only column reference.
The worksheet houses the Table. A structured column reference reads the data rows of the named Table, wherever you have placed the summary formulas.

Set up the Table with exact headers

Open a copy of the prior ten-order exercise, or create a fresh Orders worksheet from the data below. In the fresh workbook the three fields can sit next to one another in A, B and C. If you use the earlier file, choose a separate contiguous staging block for the three selected fields, or create the Table over the full original rectangle and keep the three needed header names. Gaps and duplicate labels can lead Excel to generate default or distinct headers. Read the actual field names after creating the Table instead of relying on what a copied header appeared to say.

For the most reproducible setup, use a new sheet and put Order ID, City and Amount in cells A1:C1. Use rows 2 through 11 for the first ten orders. The last row in the table below belongs to the append exercise, so leave worksheet row 12 blank for now. Enter the order IDs as text and the amounts as numbers. Apply a rupee number format afterward if your locale supports the preferred display. These figures are fictional practice data.

Order data. Enter the first ten data rows to create tblMini, then append BLK-1011 in the first lab.
Worksheet rowOrder IDCityAmount
2BLK-1001Pune64
3BLK-1002Nashik270
4AMN-1003Pune110
5BLK-1004Nagpur240
6AMN-1005Kolhapur232
7BLK-1006Pune150
8BLK-1007Solapur1299
9AMN-1008Sambhaji Nagar195
10BLK-1009Pune220
11BLK-1010Nashik90
12BLK-1011Pune300
  1. Select A1:C11 on Orders. Choose Insert Table or Home Format as Table in a supported client. Excel’s desktop and web menus can differ.
  2. Check that the selected range starts with the real header row. Enable the option indicating the selection already contains headers.
  3. Click inside the new Table, look for its name in the Table controls, and name it tblMini. In current desktop Excel the contextual tab is usually Table Design. Use the desktop controls for the rename or Resize operations if your web build presents a different set of options.
  4. Confirm the object shows the headers Order ID, City and Amount. Check the last included ID is BLK-1010.
  5. Save an untouched ten-row baseline before you experiment. A copy avoids importing a classroom test row into a future report.

Excel Table names are unique within a workbook and cannot include spaces. A teammate can open City Summary and use the same name even though that formula is outside Orders. A column heading can contain spaces, as in Order ID. Brackets indicate the heading in a structured reference. Some punctuation has special meaning inside brackets. Suggesting a column via Formula AutoComplete or selecting the intended Table field can help Excel write the notation. For the first exercise use the three printed short header names exactly.

Summarize the Table from City Summary

On City Summary set A1 to City, B1 to Sales, C1 to Orders. Enter the six approved city labels in A2:A7 in the order in the expected results below. In B2 enter the conditional sum. In C2 enter the conditional count. The first formula compares each value in the structured City column to the city in A2. For a match it adds the Amount in that same data row. The second formula counts the matching rows under the same city criterion. Fill both formulas straight down to row 7.

=SUMIFS(tblMini[Amount],tblMini[City],A2)
=COUNTIFS(tblMini[City],A2)

Read the result with the ten-row starting Table. Pune receives ₹544 from four orders. Nashik receives ₹360 from two. C2 contains a number from COUNTIFS, and the fact that source IDs are unique means it is also an order count here. Changing the workbook to one row per item or including repeated imports would change that interpretation. Save the baseline and check that City Summary reads the Table you intended by tracing one field across the two sheets. The first amount 64 belongs to matching BLK-1001, while the next amount 270 belongs to Nashik.

Compare the grouped report with a separate Table control

Place the regular total =SUM(B2:B7) in B8 and =SUM(C2:C7) in C8. In a spare cell outside the report totals, use =SUM(tblMini[Amount]) as the all-data control. In another spare cell use =ROWS(tblMini[Amount]) to count data positions. Your ten-row fixture yields ₹2870 and ten. If someone resizes the Table to include a blank trailing row, ROWS grows even though the number of valid order IDs has not. Compare the control count with the approved ID list and verify each row contains a real numeric amount before release.

Expected result after the Table includes the approved Pune append.
CitySales in rupeesOrder rows
Pune8445
Nashik3602
Nagpur2401
Kolhapur2321
Solapur12991
Sambhaji Nagar1951
Total317011

The all-data control and the grouped report agree when every Table row is valid, belongs to one selected city, and is counted exactly once. If a new city arrives, the Table can expand while your typed summary list remains the same. The ₹3170 check would detect a missing amount if the omitted amount were nonzero. The eleven-row check can also catch a newly excluded row whose amount is zero. For recurring feeds update the approved label list deliberately or use a well-defined grouping tool and check the resulting category set.

Distinguish a full field from a current row

The reference tblMini[Amount] includes the field’s data cells. You can write the explicit equivalent tblMini[[#Data],[Amount]] when discussing arguments. The optional #Headers and #Totals specifiers refer to different portions. A SUM over the data field has no reason to add the calculated Total Row into itself. A second pattern, [@Amount], is used inside a calculated column to read one amount from that same record. Its meaning depends on the current data row. It would be the wrong shape for the all-order summary, which needs every approved Amount.

Try a small calculated column in a copy. Name it Review band and enter =IF([@Amount]>=200,"200 or more","Below 200") in its first data cell. In the Table calculated column behavior, Excel typically fills the formula down the data rows. Inspect BLK-1001 with 64 and BLK-1002 with 270. Their bands are Below 200 and 200 or more. If you append approved 300 and the new data row joins the Table, check the added row receives the expected calculated band in your client. This exercise distinguishes a calculation applied to an individual record from a report calculation over an entire column.

Verify membership instead of trusting the stripes

In a test copy with Total Row off, type the new ID, city and 300 directly in the row immediately below the Table. Excel can expand the Table when you type in the cells directly underneath its existing data or use supported paste and insert operations. The exact action, adjacent contents and client settings matter. After entry click the new record and inspect the Table’s identified range, or use Table Design Resize Table where available. With the three-column setup, the correct new rectangle is A1:C12. The condition formulas on City Summary should remain textually unchanged while Pune’s result increases by ₹300 and one record.

Adding a Pune order of 300 creates a Table with eleven data rows and 3170 rupees. A Pune-only filter still gives 3170 with SUM, while a visible-row SUBTOTAL gives 844.
Adding a member changes the overall data. Filtering the view afterward changes what is visible. Different formulas answer those two questions.

Make a nearby record stay outside on purpose

On a fresh ten-row copy, type the new order in worksheet row 14, with rows 12 and 13 empty. The three neighboring cells are still values on Orders, but they are separated from the existing Table by blank rows. Check that the Table still ends at row 11 and City Summary still returns ₹544 for Pune. Next move the new values into the next intended Table row, or use Excel's supported insert and paste commands. Avoid blindly resizing across rows 12 and 13 if those intervening rows would remain blank. Resize or verify the final Table so it contains the eleven approved orders once.

Some students format row 14 with the same banded colors, then expect the report to change. A fill color describes a visual choice. The Table range and field reference describe calculation scope. Filters alone are also insufficient proof of identity because a normal range can display filter buttons. Check the Table name, design controls, and last data row together. On a client that lets you select a field in a formula, highlight the ending portion of the structured Amount column and confirm which record it includes. Clear any filter first if the goal is to inspect every member.

Follow one order from worksheet to report

  1. Confirm the first Table range

    Start with A1:C11, one header row and ten orders. City Summary has ₹544 and four Pune rows.

  2. Add approved BLK-1011

    Enter Pune and 300 in the intended next Table row. Check that the range now includes A12:C12.

  3. Read the unchanged reference

    The formula still says tblMini Amount and tblMini City. Pune goes to ₹844 and five order rows.

  4. Check the all-data controls

    Eleven Table records sum to ₹3170. Compare that result with the grouped summary, then check that each original order ID remains unique.

Predict the effect of filtering, copying and renaming

Filter displayed rows without changing Table membership

With all eleven records in the Table, use its City filter to display only Pune. This changes the view and leaves the five matching records visible. The simple all-data =SUM(tblMini[Amount]) still returns ₹3170 because it sums its data range without a visibility test. The conditional summary for Nashik also remains ₹360 when its criterion is still Nashik. For a view-dependent amount, place =SUBTOTAL(109,tblMini[Amount]) in a separate cell. It returns ₹844 with the Pune filter active and ₹3170 after clearing that filter.

The 109 function number tells SUBTOTAL to sum while excluding rows hidden manually as well as filtered-out rows. Function number 9 also excludes filtered-out rows and includes manually hidden rows. For this experiment use 109, ensure no rows started hidden, and keep the measure clear in the report. If you enable the Table's Total Row and choose a predefined SUM there, Excel commonly uses a structured SUBTOTAL. Verify the actual Total Row formula. Different entries in the Total Row can have different formulas.

For a second filter control, show only Solapur after clearing the first selection. The Table data remains eleven rows, its plain sum remains ₹3170, and the visible subtotal becomes ₹1299. Using visible subtotals can suit a reader who is deliberately selecting one part of the report. An export claiming to show every approved order needs the all-data total or a recorded filter scope. Put these measures in separate labeled cells to prevent a person from mistaking a filtered screenshot for the full workbook.

Read the changed names in the actual formulas

In a disposable workbook rename tblMini to tblMiniReview through Excel’s Table Name control. Excel normally adjusts structured references in that workbook to the changed name. Verify that the formula shows tblMiniReview and still returns the known amount. Next rename the column Amount to Net Amount and inspect the structured bracket text. Existing in-workbook formulas that refer to the original field should update to the new name. An instruction pasted into a plain text note does not participate in that formula update. Check any separate imports or other workbook links on their own terms.

A rename changes a label on an existing object. Copying the source worksheet or rebuilding it from values can create a second object or eliminate the Table entirely. After duplication, inspect which Table name the original report still uses and which name the copy has. Converting a Table to a normal range can change structured references to A1 references and loses the named Table’s append behavior. Changing the worksheet contents into a Table does not automatically rewrite pre-existing formulas that use A1 addresses. Build the structured references explicitly and use a verification copy before changing a file someone relies on.

Distinguish copying a formula from filling a series of columns

Excel's structured reference rules treat a plain copy and a directional fill differently. Copying a formula can keep the same Table column specifiers, while a normal fill to the right or left can adjust fully qualified column specifiers like a series. The ordinary vertical fill used in City Summary keeps named Table columns fixed while the relative A2 reference advances down. Modifier keys and client-specific controls can change the operation. Inspect the actual formula after a horizontal fill and decide whether you wanted the field name to shift. A named field describes something useful to a reviewer, yet it does not remove the need to predict how you created the copied formula.

For a safe check use a spare area with existing data. Enter =SUM(tblMini[Amount]) in F2. Copy it with the normal copy and paste commands into F3. Read the two references. Then on your copy try dragging a spare fully qualified single-field formula horizontally using a field with an adjacent valid field to its right, such as =COUNTA(tblMini[City]). Whether the number changes is a separate test from which field the formula reads. City and Amount each have eleven entries in this clean fixture. The repeated answer of eleven would hide the selection change unless you inspect the reference itself.

A Table object can be relocated within a workbook while retaining its name under supported operations. A new duplicate or pasted values are different inputs. Treat relocation as a controlled change: save a copy, confirm the object still has the expected name and fields, inspect the dependent text, and run all known results. Do not use this technique as a promise about a source in another closed workbook. Microsoft documents that direct links to an Excel Table in another workbook require its source workbook to be open to avoid reference errors. For recurring data across files, the appropriate workflow may be a supported workbook link to a fixed approved cell or a refreshable import.

Run two Table tests and document the results

Lab 1. Grow the source and keep formulas intact

  1. Set up tblMini with the ten initial rows, then create the two City Summary formulas. Confirm ₹544 and four for Pune and a Table total of ₹2870.
  2. Save a ten-row baseline. In a copy test a separated row 14 entry and confirm the old result, then clear the separate entry.
  3. Add BLK-1011 to the next Table data row. Review the Table boundary rather than relying on styling. Expect ₹844 and five for Pune and ₹3170 over eleven Table records.
  4. Use =AVERAGEIFS(tblMini[Amount],tblMini[City],"Pune") in a spare formula cell. Its arithmetic mean is ₹168.80 because five approved numeric amounts add to ₹844. For a city with no matching numeric amounts, check its coverage before interpreting an average error.
  5. Compare the completed summary to the printed table and check the six cities once each. Keep the formula snapshots with the results so another student can inspect what changed.

The appended amount is larger than Pune’s original average of ₹136, so its average rises. The same reasoning applies to a meal delivery order example with a high-value basket: a newly added sale can raise order count, sales and average simultaneously. Those metrics still have separate definitions. If you add a zero sale that meets the dataset policy, it raises order count and can lower average while leaving sales unchanged. If a source amount instead remains missing, investigate before reporting its row as measured zero.

Lab 2. Use two other orders, then review scope controls

  1. Return to a separate original ten-row copy with no Pune append. Add BLK-1012 for Nagpur with 410 and AMN-1013 for Kolhapur with 150 as approved Table records.
  2. Verify Nagpur is ₹650 across two, Kolhapur ₹382 across two, and the total is ₹3430 across twelve. If you also added BLK-1011 to the same copy, the total would be ₹3730 across thirteen. Record which baseline you used.
  3. Filter the Table to Nagpur. Confirm your all-data total stays ₹3430 and visible subtotal is ₹650. Clear the filter before checking the reported full extent.
  4. On another copy rename the Table and Amount header using the object’s own controls. Confirm the check values stay the same and the named arguments update as expected in the report. Discard the copy after documenting the experiment.
  5. As a final coverage test on the original ten-row copy, append a fictional Mumbai record for ₹25 without adding a Mumbai summary row. Table total becomes ₹2895 over eleven, and the displayed six-city total remains ₹2870 over ten. Add a verified Mumbai row before treating the grouped report as complete.

A team that publishes weekly should attach a short import review record. Capture the original Table bounds, the accepted row delta, any new labels, and the count and amount after recalculation. If Nagpur and Kolhapur alone changed in Lab 2, their combined increase is ₹560, exactly the difference from ₹2870 to ₹3430. If another city changes, inspect the old baseline and formulas before attributing the change to the approved append. For a website using pretend Swiggy or Blinkit-style data, the same principle would apply to a verified set of orders, whatever the example business happens to call its delivery zones.

Review three boundaries before publishing the totals

Separate headers, rows and a computed total

Select the Amount field’s drop-down in the optional Total Row and choose the sum offered by Excel. Clear all filters for the first check. For the eleven-row fixture, a visibility-aware sum at the bottom will be ₹3170 when every row is visible. =SUM(tblMini[Amount]) in City Summary also gives ₹3170, because the named data column excludes this extra worksheet row. The agreement is useful while testing this scenario. It would not give a distinct independent check of the original order import, since both functions still read the same approved data cells.

Now inspect this deliberate mistake in a spare cell outside the Table: =SUM(tblMini[[#All],[Amount]]). The #All specifier includes the Amount header, data cells and the Total Row when it is enabled. SUM ignores the header text in the reference. It adds ₹3170 of data and the ₹3170 subtotal, giving ₹6340. If you apply a Pune filter and the bottom calculation recalculates to ₹844, the faulty #All sum becomes ₹4014. This amount belongs to neither a full report nor a visible-only report. Choosing a range specifier to express the business question matters even when all the individual values are accurate.

Different scopes with the optional Total Row active and no manually hidden records.
Amount formula on another sheetAll cities shownPune only visible
SUM of Amount data31703170
SUBTOTAL with function number 1093170844
SUM of #All including the calculated Total Row63404014

When you add the new order for a clean membership test, start with the Total Row disabled as instructed. When you study totals, turn the Total Row on and verify its formula before interpreting any result. If you have entered a different calculation in the selected column, replace it on the test copy with the one you intend. The purpose of separating these tests is to observe one feature at a time. You can then explain exactly which worksheet row contributes to the data scope and which is a report calculated from it.

Separate a Table sort from a misplaced value

On the eleven-row baseline, use the Table’s heading controls to sort the complete order records by Amount. The largest row is the Solapur purchase of ₹1299 and the small ₹64 row remains matched to BLK-1001 and Pune. Sorting the entire records changes their visible order. The grouped amounts remain the same because every amount keeps its row’s city. Unlike a single-cell formula pointing to an arbitrary row position, the conditional summary evaluates the actual City field on each Table row after the sort. The expected grand total remains ₹3170, and you can look up those two known IDs to verify their fields stayed intact.

A different operation can preserve the grand total and ruin those relationships. Imagine only the two amounts 64 and 1299 are swapped between their records in a copy, with their cities and IDs kept in place. The Table keeps eleven rows and a total of ₹3170. Pune no longer shows ₹844. Replacing its 64 with 1299 gives a new city total of ₹2079. Solapur drops to ₹64. This is a pairing failure in the underlying data, despite the structured references staying perfectly correct. Detect it by matching a handful of known order IDs to their source city and amount, especially after someone edits, sorts or pastes a block of data.

Separate an approved append from a duplicate or unresolved input

Return to the eleven-row baseline. Suppose the next import erroneously contains a second copy of BLK-1011. If you accept it as a Table row, the source has twelve rows and the summary can now show ₹1144 for Pune over six rows. The all-data total rises to ₹3470. The summarized totals can agree with the new Table even though one purchase was imported twice. Before you accept a delta, reconcile the IDs in the incoming file against the previously approved batch. Imported names or dates can look similar on two different records, so use the actual order key and a documented exception decision.

In a practice copy add a column called ID occurrences. Inside it, use =COUNTIF(tblMini[Order ID],[@[Order ID]]) to count the appearances of the current row’s ID in the full column. With the exact printed sample, every original record returns one. After the mistyped duplicate, both BLK-1011 rows return two. A student can use that as a review signal and explain which batch needs repair. The simple formula assumes the validated printed identifier pattern without wildcard characters. A different feed can call for literal matching, a composite key, or a legitimate multiple-line order design. Review duplicates before allowing an automated removal step.

One missing amount is another error type. Take the eleven-row baseline again and temporarily clear the Amount for BLK-1011 while leaving its ID and city intact. COUNT of the Amount field becomes ten, while ROWS still returns eleven. COUNTIFS for Pune still counts five city records, but there are only four measured Pune amounts. You cannot interpret an average over five approved numeric amounts in this state. Inspect whether the intake omitted a measurement or legitimately needs a zero under the business policy. Restore the verified ₹300 before publishing the worked result.

Agree on the unit before a template accepts a new feed

Two sources may both provide a field named Amount while one includes delivery fees and the other excludes them. A Table recognizes the heading and stores the values. It has no definition of retail sales that can resolve the mismatch. In this exercise every amount represents the same kind of sales value in whole rupees. On a shared template, record which costs, taxes and currencies are included and tell the reviewer where the approved import rules are kept. If the incoming heading changes to Net Amount because its meaning really changed, investigate the definition before using Rename to make the old formula accept the new field.

Try a miniature reconciliation on paper. If BLK-1011 includes ₹30 of delivery fees and the comparable value should exclude those fees, the amount you would approve is ₹270. Adding that adjusted amount to the original Pune amount of ₹544 gives ₹814 across five orders. The unadjusted Table exercise gives ₹844 across the same five orders. These are two policy scenarios with one identical row count. The correct number depends on the documented rule. Keep the raw 300 and the adjustment evidence in separate fields or a separate approved staging record if you practise this extension. Restore the canonical ₹300 scenario for the lesson’s original answer.

Write a short acceptance record for the import

Act as if the next person reviewing this report has never seen your workbook. Record the source worksheet, the Table name and exact approved fields, the expected starting count, and the expected number of new records. State the currency and whether returns are allowed as negative rows. Include the three cases that tell your review apart: one approved append, one candidate outside the Table, and one duplicate inside it. Give every scenario its own file copy or turn it into a written exercise before manipulating the same baseline again.

  • Source still at ten rows. A separate candidate entry below a gap leaves the Table unchanged. Confirm the worksheet row and range membership before blaming the report formula.
  • Source grows once to eleven rows. Confirm BLK-1011 appears once, Pune shows ₹844 across five records, and the overall Table total reaches ₹3170.
  • Source grows unexpectedly to twelve rows. Confirm whether the extra entry is approved. A repeated ID can add ₹300 again even though every monitored formula calculates successfully.

Capture the first and last approved IDs if the sheet stays in intake order. Use sorted or filtered views for diagnosis, and record the active view if your evidence depends on visibility. A separate copy can preserve the original received sort order. The report’s structured reference makes it easier to locate its inputs after another person inherits it. The acceptance record gives that person enough evidence to decide whether the inputs should have been there in the first place.

Explain the reference before looking at its answer

Quiz

What does tblMini[Amount] point to?

The data cells of the Amount field in tblMini. It excludes the header and optional Total Row. You can use it from City Summary because the Table name identifies a workbook object.

Why can a new amount in row 14 leave the report unchanged?

The record can be outside the named Table’s current rectangle. Inspect the Table boundary and add the record as a data row before expecting a new result.

Which value does SUBTOTAL show when the eleven-row Table is filtered to Pune?

₹844 with the displayed 109 SUM setting and the five Pune rows visible. A regular SUM over the structured Amount column still shows ₹3170.

What is the Pune mean after appending its ₹300 order?

₹168.80, calculated from ₹844 divided by five approved numeric orders. The count and accepted source amounts explain the average.

Does turning a source range into a Table rewrite old A1 formulas?

Existing A1 references stay A1 references. Rewrite the report arguments to name the approved Table fields and test with an append.

Interview questions and answers

How would you demonstrate that a new record entered the data scope?

Verify the actual Table range includes the record. Then inspect a known changed city total and match the overall record and amount controls against the independently approved source. Styling is insufficient evidence.

When should you use a Table column and when should you use a current-row reference?

Use the named data column for aggregation across the set. Inside a calculated Table column use the current-row form for a row-level result such as the review band.

If the report and a filter-aware subtotal disagree, what do you inspect?

Check whether they answer the same scope question. Ordinary sum covers the named data rows. SUBTOTAL can reflect which rows are visible. Label the measures and verify the active filter independently.

How do you validate a renamed or duplicated Table?

Find the original object name, distinguish a name change from creation of a copy, and confirm which name the report has after the operation. Recheck one unchanged and one changed case with known amounts.

Why can a structured formula still miss a city in the summary?

A correct Table reference can include the new record while the summary's manually typed criteria list lacks its city. Compare the grouped totals to all Table rows and review whether each approved label appears once.

Revision cards

  • Table identity. A unique workbook object name can be used from another sheet in the same workbook.
  • Data field. A plain named column points at data rows and excludes the heading and Total Row.
  • Current record. The at sign marks the amount in one Table row for a calculated column.
  • Membership. An appended record contributes after it joins the Table’s data range.
  • Visible subtotal. SUBTOTAL can respond to filtered data where an ordinary SUM reads the whole field.
  • Review the object. Inspect names, exact headers, boundaries and coverage after changing the source.

Revisit the original before and after order illustration, or practise grouping and Table references in the Excel Practice Task Hub. Continue to three-dimensional references for repeated worksheet layouts.

Microsoft references