23. Formulas Across Sheets and Workbooks
23.2 Referencing a Normal Range on Another Sheet
Add orders from another sheet without moving the order log
A fictional Pearl Textiles shop wants to know which cities placed orders this week. The order log has several Pune entries with different amounts. A manager asks for Pune’s total sales and how many orders contributed. Linking to one cell would answer only one of those orders. You need the set of rows that belong to Pune, one operation to add the amounts and a second operation to count the matching records. Keep the source on Orders and build the small report on City Summary.
A normal range is a group of worksheet cells addressed by coordinates, such as G2 through G11. A colon includes the first cell, the last cell, and every cell between them in that column. You can select, format, sort and calculate with a normal range. It has no separate named Excel Table object that represents its data membership. In this exercise ten approved order rows are bounded by rows 2 and 11. The result should respond when you correct a number inside those ten cells. It can continue to look valid after an eleventh order lands below the last address.
- Choose the report scope first. Here one valid row is one approved order. For a log of order items, a matching row count would measure lines instead.
- Pair tests and values by position. The first city should belong to the first amount, the second city to the second amount, and so on.
- Check coverage with an independent control. Compare the report’s summed counts and amounts with the approved source extent. A formula returning a number only proves it found something to evaluate.
Build the exact worksheet geometry
Create a new workbook and add Orders and City Summary. On Orders put Order ID in A1, City in C1, and Amount in G1. Leave the unused columns blank for the exercise. Enter each row’s values at the printed row number. Do not pack this three-column excerpt into A through C. If the amount moves to C in your practice setup, the formula pointing to G would then read an entirely different column. Add a small note above or on a separate page naming the period and stating that all amounts are whole rupees.
| Row | A · Order ID | C · City | G · Amount |
|---|---|---|---|
| 2 | BLK-1001 | Pune | 64 |
| 3 | BLK-1002 | Nashik | 270 |
| 4 | AMN-1003 | Pune | 110 |
| 5 | BLK-1004 | Nagpur | 240 |
| 6 | AMN-1005 | Kolhapur | 232 |
| 7 | BLK-1006 | Pune | 150 |
| 8 | BLK-1007 | Solapur | 1299 |
| 9 | AMN-1008 | Sambhaji Nagar | 195 |
| 10 | BLK-1009 | Pune | 220 |
| 11 | BLK-1010 | Nashik | 90 |
Put City, Sales, and Orders in City Summary A1:C1. In A2 through A7 enter Pune, Nashik, Nagpur, Kolhapur, Solapur and Sambhaji Nagar. The summary list deliberately has one row per city. On the source, repeating Pune is expected because distinct purchases share a city. On the summary, repeating Pune would count the same approved orders into two displayed rows if you totaled the report. Where the list comes from is part of the report design. A verified set of allowed cities is sufficient here.
Trace the positions behind SUMIFS and COUNTIFS
SUMIFS adds amounts where all supplied conditions hold. The first argument says where amounts live. The next two arguments are a pair: the cells to test, followed by the test value. Here the sought city comes from A2 in the report. COUNTIFS has conditions to test, beginning with a range and its criterion. It has no separate amount range. You want the same city condition to produce the count that explains how many source rows contributed.
=SUMIFS(Orders!$G$2:$G$11,Orders!$C$2:$C$11,A2)
=COUNTIFS(Orders!$C$2:$C$11,A2)
Enter the first formula in City Summary B2 and the second in C2. Select B2:C2 and fill down to row 7. The report’s criterion in A2 is an unqualified reference because the city list lives on the same worksheet as the formula. The prefix Orders names the source for each range. Use an equals sign at the start of each formula, and use the list separator expected by your Excel installation. You may see commas or semicolons in locally entered formulas. The choice of separator doesn't change which record is checked.
Walk through the first and last matching rows
At the first pair, Orders C2 says Pune and Orders G2 says 64, so the sum includes 64 and the count increments to one. At the second pair, C3 says Nashik, so 270 stays out of Pune’s result. Continue through row 11. Pune qualifies in rows 2, 4, 7 and 10. Add 64, 110, 150 and 220 to get ₹544. The calculation includes four matching records. For Nashik in the next report row the very same source addresses give a different answer because the criterion becomes A3.
Keep the source still while the question moves
The dollar signs keep C2:C11 and G2:G11 anchored when you copy the report formula down. In B3, the two Orders ranges stay as before and A2 becomes A3. Therefore the question changes to Nashik, while the worksheet record selection stays constant. If you also freeze the row of the report criterion as $A$2, every line repeats the Pune result. If you leave all source addresses relative, the copied formula for Nashik may skip the first order and read an extra row at the end. This could still give the same Nashik answer for these first two lines because row 2 is Pune. An unchanged answer on one row is weak evidence that the copying worked as planned.
Compare A2 and $A2 when teaching someone to reproduce the report. Both move the report criterion from row 2 to row 3 when filled straight down. The second pins the criterion column if you copy across report columns. Neither confines the written value of A2. You can replace the label in the report and the formula will ask a different city question. Dollar signs define copying behavior. They do not protect the worksheet against editing and do not turn a normal range into an automatically expanding Table.
Clicking and dragging on Orders while entering a formula is useful for checking an address or allowing Excel to quote a sheet name with a space. Review the finished formula in the formula bar, including both source prefixes. If an address highlighted on the grid looks hard to follow, read the starting line and ending line aloud or write them on the evidence sheet. On clients offering Formula Auditing, Trace Precedents can help locate cell dependencies. For another worksheet the tool can show a worksheet symbol rather than an arrow spanning to the actual cells on screen. Checking the formula and the source labels works across the lesson’s clients.
Verify the completed summary
| City | Sales in rupees | Order rows |
|---|---|---|
| Pune | 544 | 4 |
| Nashik | 360 | 2 |
| Nagpur | 240 | 1 |
| Kolhapur | 232 | 1 |
| Solapur | 1299 | 1 |
| Sambhaji Nagar | 195 | 1 |
| Total | 2870 | 10 |
Use =SUM(B2:B7) and =SUM(C2:C7) in the total row. Pune leads in order count, but Solapur leads in amount on this small sample because its single order is ₹1299. Report the two results with their units. Avoid summarizing both by saying “biggest city.” If you add average order amount per city as a practice column, divide the city’s sales by its valid order count. Pune’s average is ₹136 and Nashik’s is ₹180. Overall average is ₹287 across ten orders, rather than the unweighted mean of six city averages. Zero matching orders would need its own status before dividing.
Prove when a source change is inside the report’s scope
Save a separate copy. Change G2 from 64 to 74 and recalculate. Pune sales moves from ₹544 to ₹554 while its matching count stays four. Every other city stays the same. The total increases to ₹2880. This is one controlled correction inside the existing source range and the existing scope of the report. Restore 64 before appending any new data. Keeping each change on its own means you can say exactly which formula behavior produced an unexpected result.
Now type BLK-1011 in A12, Pune in C12 and 300 in G12. You have added a valid order in the next blank row without editing the report formula. Its last amount is G11 and its last city is C11. Both defined ranges exclude row 12. Pune stays ₹544 across four reported orders. The source has five Pune rows. Counting within the same fixed ranges a second way can reproduce the error. Check the approved last record independently, for example from the known final ID and source load note.
Put equal boundaries on both kinds of range
Extend the amount range to G2:G12 and the city range to C2:C12 in the SUMIFS formula. The same extension goes into COUNTIFS. Fill the corrected formulas down to every city and inspect two resulting rows. The corrected Pune result is ₹844 and five rows. Totals are now ₹3170 and eleven rows. Same start and end rows are the simplest check when two columns contain corresponding fields in the same worksheet record. If you extend only one range inside SUMIFS, the dimensions differ and Excel can return #VALUE!. If you only fix the SUMIFS pair, the summary can silently show ₹844 and four orders until you correct COUNTIFS as well.
=SUMIFS(Orders!$G$2:$G$12,Orders!$C$2:$C$12,A2)
=COUNTIFS(Orders!$C$2:$C$12,A2)
Equal size is necessary but cannot prove alignment. To see why, deliberately pair the original ten cities in C2:C11 with the ten amounts in G3:G12. Pune’s matches in the city range are still positions corresponding to rows 2, 4, 7 and 10. The shifted amount range picks G3, G5, G8 and G11: 270, 240, 1299 and 90. They add to ₹1899, a plausible store total that belongs to no correct Pune calculation. Even a correctly computed order count of four would provide no protection. Inspect paired start and end coordinates as well as the dimensions.
Wrong coordinates can be easier to detect if your first sample rows are deliberately different. Adjacent shops with identical ₹100 amounts would conceal a row shift for a one-row check. In this fixture 64 and 270 are different, as are their city labels. Use the manual first pair once after a structural edit. The same tactic helps when checking an imported student register or a show’s merchandise sales. Distinct control records reveal pairing failures that a round total might hide.
Follow a new order through the fixed boundary
Start at ten approved rows
Pune uses source rows 2, 4, 7 and 10. City Summary shows ₹544 for those four orders. The source range ends at row 11.
Append one record
Put BLK-1011, Pune and ₹300 in row 12. The source now has eleven approved records. The existing report still evaluates its first ten.
Extend the formula pairs
Set the same endpoint in the amount and city ranges. Extend the count boundary too. Retest the first match and last included match by source ID.
Reconcile the report
Pune changes to ₹844 over five rows. The report totals become ₹3170 over eleven rows and the five other city results remain unchanged.
Turn worksheet cells into a dependable order report
State which order rows the calculation may include
Every row in the ten-order fixture is approved for the total column. In a real shop a mixed log may contain awaiting delivery, delivered and cancelled orders. "Total tracked order value" and "Delivered sales" are two measures with different conditions. Assign a source status for the comparison rather than relying on the cell color or an informal note. Decide how to handle refunds, cancelled orders, and incomplete records before filling in the reporting formula. State the policy beside the results so a reader knows which amounts they can compare.
Try the following extension only on the original ten-row copy. Put Delivery status in H1 and enter Delivered on all ten order rows except H4, which should say Pending. City and delivery status are now independent tests. To add delivered Pune amounts, SUMIFS checks whether the city equals Pune and the status equals Delivered on each pair of corresponding cells. To count delivered rows, use the same two tests in COUNTIFS. The phone-size fixture keeps one pending row so you can hand-check what each condition removes.
=SUMIFS(Orders!$G$2:$G$11,Orders!$C$2:$C$11,A2,Orders!$H$2:$H$11,"Delivered")
=COUNTIFS(Orders!$C$2:$C$11,A2,Orders!$H$2:$H$11,"Delivered")
For Pune, the delivered amount is 64 plus 150 plus 220, or ₹434. The delivered row count is three. Pune’s all-order amount of ₹544 still has a purpose. The gap of ₹110 isolates the one pending sample row under this policy. For a more complicated report, first verify the conditions define disjoint groups before claiming two measures sum to a third. Delivered and Pending could cover every order here because those are the only statuses assigned. A blank or Cancelled status would need its own treatment.
Review source issues with separate counts
- Look for city groups that fail to reconcile. A source label may have trailing spaces, a different approved spelling or a missing city. A summary with one criteria row per approved label will leave some orders outside the displayed groups.
- Check numeric amount coverage. In this ten-row fixture
=COUNT(Orders!$G$2:$G$11)should give ten. A stored text amount, blank or error makes the result lower. Investigate which ID needs correction before presenting the money total. - Check one row per approved order. A city count reports matching record rows. If BLK-1001 appears twice, two rows match. Use a separate duplicate-ID review so you can tell a second purchase from a repeated import.
- Keep unknown separate from measured zero. A label absent from the approved source has no matching rows. Two approved rows could also add up to zero if a sale and refund offset. View count and amount together so these scenarios stay visible.
For a duplicate check on Orders, an optional helper in I2 can use =COUNTIF($A$2:$A$11,A2) and fill down. All checked IDs in this controlled ten-row sample should return one. If an import contains multiple legitimate lines per order, the helper should identify them for a different modeling decision, such as summing items and calculating a separate distinct-order measure. Removing every repeated ID would lose legitimate sales in that different source design. Document the expected row structure before deciding how to repair the data.
For a label correction exercise, type a trailing space after Pune in C4 on a copy and keep the original approved summary labels. Pune then leaves 110 outside its matched rows. The aggregate across the six shown cities becomes ₹2760 and nine matched rows, even though the source still has ten known IDs and ₹2870. Inspect C4 and compare the displayed text with the original entry. Use =LEN(Orders!C4) to see five characters instead of four. Confirm which approved city the source was meant to record before changing it. In an import, preserve the raw label and create a cleaned or mapped label with an auditable rule.
Choose a stable boundary for the next reporting period
If someone promises a deliberately frozen period of ten records, an explicit range expresses that boundary well. Keep the approved last row and known cutoff in your review note. If the next person will append records every day, updating the two formula endpoints and the count endpoint once per change becomes error-prone. An Excel Table can express membership by named columns, and you can verify its expansion when you type a new row. The next lesson uses tblMini to read the same order sample after the approved append. The membership check still matters, because a nearby row separated by other worksheet content can sit outside the Table.
A whole-column reference such as Orders column G paired with Orders column C can include new records without an explicit last row. Every cell in the whole-column ranges is also potentially in scope. A second export, a label in a footer or a hand-entered test row could match your criteria. Multiple large formulas can increase calculation work. A dedicated column guaranteed to contain only one feed is a narrower case. Choose the broad reference only when the worksheet structure and usage make that scope true. Consider a Table or imported cleaned data for a recurring reporting feed.
Use one published method consistently enough that another person can review it. A “fix” that includes the new endpoint for Pune but leaves every other city on row 11 is hidden scope drift. If the next append belongs to Nashik, its updated row can remain out while Pune continues to pass. After modifying the formulas, look down the complete column of source addresses, or rebuild from the corrected first formula and fill down deliberately. Reconcile against the same approved source scope for all cities before handing off the report.
Practice and record what actually changed
Lab 1. Compare matching rows, scope and amount
- Enter the original ten rows at the given A, C and G addresses and save a baseline workbook. Create the six-row City Summary and fill the two formulas.
- Locate the four Pune IDs and add their amounts by hand. Confirm ₹544 over four records and verify the total row is ₹2870 over ten records.
- Change Orders G2 from 64 to 74. Record the expected change before observing it. Pune becomes ₹554, ten total rows still qualify across the report, and total sales becomes ₹2880.
- Restore 64. Append BLK-1011 and ₹300 in row 12. Compare the still-fixed report with a known last approved row and a separate source amount control. Note the missing ₹300 and one order.
- Extend both SUMIFS ranges and the COUNTIFS city range, fill down, and confirm ₹844 and five orders for Pune, ₹3170 and eleven overall. Inspect the formula for Solapur as well.
- Save the extended test as a clearly named copy. Keep the original fixture available for the second lab and the later Table lesson.
Use an evidence trail that names the operation, the expected result and the value you actually observed. If the worksheet reads a different amount after your append, first check the formula bar. Excel can adjust some references when you insert rows or extend adjacent data as part of a different editing operation. This test enters the new values in the already blank row below an ordinary range. To reproduce the intended stale-boundary scenario, check the address after the append and confirm which exact operation happened.
Lab 2. Detect a shifted range, then add a business condition
- Start from a disposable original copy. Put ₹300 in G12 with the row 12 city and ID for the shift test. In a spare Summary cell, use the first ten cities with amounts G3:G12. Compare the deliberately wrong Pune value of ₹1899 with the correct original ten-row result of ₹544.
- In the spare cell, change the city range to C2:C12 while keeping G3:G12. Now the number of positions differs. Look for #VALUE! and identify the mismatch by counting both endpoints.
- Restore the ten-row fixture. Add the delivery statuses in H and compute the two-condition values in new report columns. Check ₹434 and three delivered orders for Pune, compared with ₹544 and four across both statuses.
- Transfer only the status of the ₹110 order from Pending to Delivered. Pune delivered changes to ₹544 across four rows. Total tracked sales remains ₹544. Restore Pending before the next test.
- Check all ten numeric amounts with COUNT and confirm the ten approved IDs match the source. On another copy, try the deliberate trailing-space case, observe the missing one row and ₹110, and restore the approved city spelling.
- Remove or close the temporary copies. Keep the clean test data and record one case where a valid-looking number hid a logic error and one where Excel displayed an error directly.
Write the reason your finished report can be trusted
Finish with three short statements about input extent, grouping and arithmetic. For input extent, identify the ten original IDs or the eleven after the confirmed append. For grouping, show that the approved city list covers every included order and each approved order belongs to one city. For arithmetic, show which exact coordinates pair city with amount and verify the two controls. If the report is delivered daily, compare the saved extraction time and its approved cutoff before assuming a new row belongs to this particular day. A separate order was deliberately in scope when we extended the lab, but tomorrow’s orders could legitimately stay out of today’s report.
Investigate three reports that disagree by one row
The source and report both say ten rows, but the amounts differ
Imagine you receive two rows of review evidence, with the report totals at ten orders and the approved source total at ₹2870. The report’s sales figures do not agree with the source after an edit. Read the count formula first. It describes which city cells it tests and can show whether the original city scope is still present. Then inspect each SUMIFS amount range. A single shifted start row could bring in the appended ₹300 and drop the original ₹64 while still producing ten paired positions. If the shift affected every city row and the six labels remain exhaustive, total money becomes ₹3106, whereas the order count still says ten. This is an amount alignment failure rather than a missing criterion.
Use the discrepancy to propose one simple check before trying to fix everything. ₹3106 minus ₹2870 is ₹236. An analyst can confirm that ₹300 minus ₹64 is also ₹236, then read the first and last amount addresses. The equality of these two differences is evidence for a particular hypothesis. The formula bar confirms it directly. In a large workbook, inspect a copy and repair one source formula first. Once the amount alignment and known city values match, fill the correction down and rerun both controls. Keep the previous copy until the new calculation matches the documented scope.
The count falls by one and the source still contains ten valid IDs
Read the summary labels from A2 through A7 and compare them against the source column. Suppose the row with ₹110 still has its approved ID, but the city label has a trailing space. The Pune count drops from four to three and its displayed sales drops from ₹544 to ₹434. Those values happen to equal the sample delivered-subset values. The important evidence is which condition the report actually tested. An all-order figure of ₹434 signals incomplete city grouping here. A delivered-only figure of ₹434 follows the approved status rule. Put counts and totals next to their measure names rather than treating the numbers alone as a signature of correctness.
Review whether the count failed because the source boundary is short or because the approved grouping list lacks the row's current city label. The boundary check can start from the saved last row or imported record count. For the label check, compare an ID's raw city with the approved alias list. If the report repeats a valid city under two display names, the gap may go the opposite way: the displayed groups could cover some records twice. Keep report labels unique under the criteria method and verify what names are allowed before reconciling.
The source includes ten rows but a manager wants a count of purchases
On the printed source the row count and purchase count are equal. Use a separate imagined marketplace export with one row for each order item. An Amazon-style example could contain one Pune purchase with a ₹64 item and a ₹110 item under the same order ID. These example figures describe a fictional export, not Amazon's own data. Counting rows returns two; the customer made one order. Summing the item values returns ₹174, which can still be a valid total if both lines belong to the same selected sales definition. A count of one unique order requires evaluating identifiers at the order grain, the kind of thing a row or record represents.
For a small check, list the order IDs for one city and tally unique values on paper. In a big workbook an existing line-level feed can be summarized into a separate verified one-row-per-order sheet, or explored later with suitable distinct-count tools. Give the two report columns honest headings such as Order lines and Orders. If you join a one-row-per-order file to a many-line file, test whether order-level values got repeated. SUMIFS will faithfully add matching amounts according to the worksheet layout, including repeated values when they exist in the sum range.
Check whether a new record belongs to the report period
On a November handoff, a ₹300 Pune entry might be recorded after the approved close. If it is a correction to November, the analyst can reopen the approved source and document why the original ten-row version changed. If it belongs to December, the November report can retain its fixed boundary even though the December row is nearby. Keep a real date or period field and an approved inclusion rule if the worksheet contains several periods. Moving an endpoint because you see another number is a worksheet action that still needs a business reason.
For an optional practice check, keep the original group summary on a sheet labeled Closed extract. Make a second copy for the revised eleven-row sample. Compare the two under the same currency and city definitions. The total difference should be ₹300 and one approved record, with all of the change assigned to Pune. If a second city differs, check that the two workbook copies have matching original records before presenting any explanation.
Set aside a small repeatable result sheet for review
Create a Review sheet in a practice copy and give each row a question. Fill Expected using the lesson fixture or another independent approved source. Fill Observed using the current report, so they compare separate evidence. You can add a text status with an IF equality test for exact integer amounts. For actual money measured to different fractional precision, compare using a verified rounding rule at the agreed unit. Keep the original integer rupee inputs for every check here, so the exercise uses no rounding tolerance.
| Question | Expected | Evidence to inspect |
|---|---|---|
| How many approved records arrived? | 10 | Original order list and final approved ID BLK-1010 |
| How many entered amounts are numeric? | 10 | Source Amount column within the approved boundary |
| What does the group summary cover? | ₹2870 across 10 rows | Total of six single-city report rows |
| Which detail supports Pune? | ₹544 across 4 rows | The four approved IDs and the matching City cells |
| What is Pune’s delivered subset in the status lab? | ₹434 across 3 rows | The optional H column and the pending ₹110 order |
Store the append scenario on a second review tab or in its own test file. The source approves eleven orders there. That gives you two valid unambiguous reference points instead of a single target that someone overwrites every time the input changes. If you later change the city names or add a new status, preserve the prior test record and add a new condition beside its acceptance rule. A short list of labelled controls makes it possible for a student to review another student's workbook without relying on color, layout or someone else's memory.
Explain the difference between a broken formula and a wrong report
Quiz
Which argument comes first in SUMIFS?
The amount range that will be summed. Here that is Orders G2:G11. A criteria range and its sought label follow it.
What moves when you fill Summary B2 down?
City Summary A2 changes to A3 while the two locked Orders ranges keep the same start and end. The question changes to Nashik, not the set of source rows.
What happens if only the amount range reaches row 12?
SUMIFS receives a different number of positions for amounts and cities and can return #VALUE!. Match the two starting and ending rows and update the count separately.
Which Pune result proves the appended row was included?
₹844 across five rows. Seeing ₹544 across four rows after entry still describes the original ten-row range. Compare the approved last ID as a separate control.
Why can count be four even when the conditional sum is wrong?
COUNTIFS tests cities without reading the paired amount column. A shifted amount range can add other cities’ money for the right four city positions.
Interview questions and answers
How do you explain report scope to a teammate?
Show the precise source rows and define one row as one approved order. Then name the criteria, such as City equals Pune, and demonstrate a known row inside or outside the range.
When would you use a normal range?
A fixed and well-documented report extract may benefit from explicit boundaries. For recurrent appends, named Table columns can make the source membership easier to inspect and update.
Why did the wrong amount remain a number when the range shifted?
Both ranges still have ten cells, so Excel pairs the first items, second items, and so on. It has no independent way of knowing G3 belongs to Nashik rather than the Pune in C2.
How do you validate delivered sales?
Use consistent conditions for city and delivery status in both SUMIFS and COUNTIFS. Compare the delivered subset with a hand-checked sample and report what pending or blank statuses mean.
Does a COUNTIFS result give distinct orders?
It counts eligible rows. That equals the number of orders here because one approved row represents one unique order. A line-item log or duplicate import requires a distinct-ID method and its own business checks.
Revision cards
- Normal range. Coordinate block, with a first and last cell you can read.
- Pair by position. Match source bounds so the city and amount describe the same order.
- Criteria copy. Lock directions on the source. Let the report’s selected city advance.
- Coverage check. Confirm the approved final ID and match row counts with your source.
- Additional test. Put the status range and the requested status into each relevant calculation.
- Count meaning. Matching rows and distinct orders agree only when one approved row represents one order.
Use the Excel Practice Task Hub to practise conditional totals, then continue to structured Table references for the same order data.
Microsoft references
- SUMIFS arguments, criteria, and range sizes
- COUNTIFS conditions and positional pairing
- Diagnosing SUMIFS ranges with different dimensions
- Reference behavior when copying a formula
- COUNTIF text criteria, spacing, and wildcards
- Cross-sheet references and range notation
- Counting numeric values for source coverage
- Trace Precedents and workbook dependencies