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

9. Dynamic Arrays

Excel

9.8 VSTACK and HSTACK

Decide whether the blocks belong below or beside each other

Think of two stores exporting orders at the end of a shift. Each file contains records with an order ID, city and amount. A fictional Blinkit and Amazon Now training exercise calls its two stores FreshGo and MarketRush. The manager needs one longer list for an overall total. Another report needs two columns, store name and amount, side by side. Both use the same source records. The two goals have different output shapes.

VSTACK appends one array underneath another in the order you supply them. HSTACK puts blocks to the right of each other. An array is a rectangular block of values, such as seven rows with three fields. These functions form another rectangle from the values. A schema in this lesson means the expected names, order and meaning of the fields across a record. A key such as Order ID identifies which record a value belongs to. These words describe the checks a responsible analyst makes before putting rectangles together.

All the records and amounts below are invented workshop data. They are arranged to let you trace individual cells through the formula. Use amounts as numeric rupees and keep IDs as text. Confirm the result independently before building another formula on it.

Predict the shape before entering a formula

For VSTACK, add the input heights and take the largest width. Stacking a seven-row, three-column block and a three-row, three-column block gives ten rows and three columns. For HSTACK, take the largest height and add the widths. A two-row label column beside a two-row total column gives two rows and two columns. Both results need room to spill from the formula anchor.

Read each size as rows × columns.
Input sizesVSTACKHSTACKCheck
7 × 3 and 3 × 310 × 37 × 6HSTACK pads the last four rows of the shorter block
2 × 1 and 2 × 14 × 12 × 2Check that side-by-side rows represent the same labels
2 × 1 and 2 × 24 × 22 × 3VSTACK pads the missing field in the two narrower rows

Padding fills positions a shorter or narrower input does not supply. In the default stack functions those extra cells show #N/A. A source cell can also contain a real #N/A, for instance from a lookup that has no match. Visually those errors can be identical. Inspect block geometry and source errors separately to tell where each came from. Later you can specify useful padding where missing positions are expected. Blanket error replacement would also hide faults in values you actually received.

Keep headings separate from ordinary records

  • Source heading. A heading names one field. It is often in row 1 on a source tab. Taking a range that starts in row 2 uses data only.
  • Output heading. Put one heading above the combined list with a separate cell row or include it by intentionally stacking a one-row header piece first.
  • Record count. If the spill includes the heading, ROWS includes that row. Label the count, or count the data-only result.
  • Typed data. A numeric-looking value could actually be text. If you need a reliable sum, compare both the record count and the count of numeric amounts. A report can have the correct number of rows and still omit several text amounts from its total.

Microsoft identifies VSTACK and HSTACK as Excel 2024-era functions and also documents them for current Microsoft 365 and Excel for the web. Older dynamic-array editions can support foundational tools such as FILTER without having the stack functions. Try a small call in the edition that will recalculate your workbook before handing it to a classmate. Excel Tables may feed a formula with structured references. Put the multi-cell result outside the Table body and clear its intended output area.

Lab 1. Append two order exports and prove nothing shifted fields

Make three sheets named FreshGo, MarketRush and Combined. Enter the two source blocks beginning at A1 on their respective tabs. FreshGo covers A1:C8 and MarketRush A1:C4. These are separate record lists, with one row per fictional order. Before combining them check that both use rupees, both use the same Order ID definition and neither has a subtotal row at the bottom.

FreshGo A1:C8
Order IDCityAmount
BLK-1001Pune64
BLK-1002Nashik270
BLK-1004Nagpur240
BLK-1006Pune150
BLK-1007Solapur1299
BLK-1009Pune220
BLK-1010Nashik90
MarketRush A1:C4
Order IDCityAmount
AMN-1003Pune110
AMN-1005Kolhapur232
AMN-1008Sambhaji Nagar195
  1. In Combined A1:C1 type Order ID, City, Amount. In A2 enter =VSTACK(FreshGo!A2:C8,MarketRush!A2:C4). Expect the data to spill through C11. The two inputs exclude source headers.
  2. Check A2:C2 for BLK-1001, Pune, 64. Check A8:C8 for the last FreshGo order BLK-1010, Nashik, 90. Check A9:C9 for the first MarketRush order AMN-1003, Pune, 110. The handoff from the first block to the second is often where a skipped or duplicated row appears.
  3. Outside A2:C11, enter =ROWS(A2#) to get ten and =COLUMNS(A2#) to get three. Verify =COUNT(CHOOSECOLS(A2#,3)) also returns ten because every amount in this fixture should be numeric.
  4. Verify =SUM(CHOOSECOLS(A2#,3)) returns 2,870. On a calculator or the source tabs, 2,333 from FreshGo and 537 from MarketRush add to that figure. The three controls cover shape, type and total.
  5. To include a heading row in the spill itself, try the following in E1, where it has room to grow. Expect eleven rows through row 11, of which ten contain actual orders. Keep later formulas clear about which result includes the headings.
=VSTACK(FreshGo!A1:C1,FreshGo!A2:C8,MarketRush!A2:C4)

Source formatting does not define what a formula returns. Apply consistent number formats to the report after checking the underlying numbers. Your shape tests should remain valid if cells are formatted with a currency symbol and commas. Do not display a header, blank spacer or source total as if it were an order.

Run a deliberate field-order failure

Make a fourth sheet Moved. Put City, Amount, Order ID in A1:C1. Copy the three MarketRush orders into A2:C4 in that new order. The first row should visibly read Pune, 110, AMN-1003. This gives two blocks of the same width with different field order.

In a free test region set =VSTACK(FreshGo!A2:C8,Moved!A2:C4). Excel still returns ten by three, because it aligns by position. The last three rows carry text IDs in the third column where you intended numeric amounts. The third-column sum becomes ₹2,333 because SUM ignores those text IDs in the array. For the affected rows, the first column contains city names and the second numeric amounts. Looking at both counts would expose the problem: ten records and only seven numeric values.

=VSTACK(FreshGo!A2:C8,CHOOSECOLS(Moved!A2:C4,3,1,2))

Replace the scratch expression with the formula above. CHOOSECOLS builds a block in the agreed order before the append. The incoming third column supplies Order ID first, the incoming first column supplies City next, and the incoming second column supplies Amount last. Check AMN-1003 appears below the final FreshGo row and its third entry is 110. Verify the two counts are ten and the total returns to ₹2,870.

The combined order is ID, City, Amount. The moved source instead lists City, Amount, ID. Selecting its columns 3, 1 and 2 restores the required order.
Align the source field order before stacking. Correct width alone does not prove correct fields.

Trace one row through the append

  1. Read the expected fields

    The combined list needs ID first, City second and Amount third.

  2. Notice the source move

    The Moved sheet stores Pune, 110 and AMN-1003 in that order. All three cells are present but in a different order.

  3. Select the output order

    Take Moved columns 3, 1 and 2, producing AMN-1003, Pune, 110.

  4. Check the combined list

    Count ten rows and ten numeric amounts. The third-column total should be ₹2,870.

Lab 2. Put labels beside amounts by matching the keys first

Create a Summary sheet. The manager wants FreshGo first and MarketRush second. Suppose the source totals sheet sends the stores in the opposite order. This is a realistic failure to test, because both amount columns have exactly two entries. An ordinary HSTACK accepts both arrays and returns a tidy result without warning you that a number is next to the wrong name.

Build the incoming summary in A1:B3 and the display order in D1:D3.
RowA · Store keyB · AmountD · Display store
2MarketRush=SUM(MarketRush!C2:C4)FreshGo
3FreshGo=SUM(FreshGo!C2:C8)MarketRush
  1. In F2, enter =HSTACK(D2:D3,B2:B3). It returns FreshGo with 537, then MarketRush with 2,333. The sum of the two totals remains 2,870, even though each pairing is incorrect.
  2. For the keyed result, use the next expression in I2 with two open columns. Inside XLOOKUP, each desired store name is the search key. The lookup searches A2:A3 for that name and takes the corresponding result from B2:B3.
  3. Read the correct result as FreshGo 2,333 and MarketRush 537. Check each against its own source range. A total across all stores only detects some errors and could not detect this swap.
  4. Reverse the display names in D2:D3. The rows and their amounts should move together. The matching value still comes from the same store.
  5. Restore the original display order. Then temporarily replace MarketRush in D3 with QuickCart. The second row should show the missing-key message while the valid FreshGo amount remains 2,333. Return D3 to MarketRush after the test.
=HSTACK(D2:D3,XLOOKUP(D2:D3,A2:A3,B2:B3,"Missing store"))

The lookup uses the default exact match. The A column supplies one row for each store in this fixture. If the source could contain two rows for the same store, ask whether they are duplicate reports or transactions that need to be summed. XLOOKUP's default search returns the first matching result. That behaviour does not decide which duplicate record should be authoritative. Summarize the transactions with an agreed rule or enforce unique incoming keys before doing the lookup.

FreshGo was paired with 537 and MarketRush with 2333 by position. Looking up their keys gives FreshGo 2333 and MarketRush 537.
A lookup ensures that each amount comes from the same store shown in its row.

Build a small report from pairs you control

When your formula creates both the labels and the totals under the same rules, you can deliberately produce them in matching order and place the arrays beside one another. Use the following in an independent output area. The first VSTACK creates a two-row label column. The other creates a two-row number column in the same FreshGo-then-MarketRush order. HSTACK gives each pair one output row.

=HSTACK(VSTACK("FreshGo","MarketRush"),VSTACK(SUM(FreshGo!C2:C8),SUM(MarketRush!C2:C4)))

Check that you read matching pairs, FreshGo then 2,333 and MarketRush then 537. If you add labels and totals manually one at a time, update them together. In a larger workbook, the labels may come from UNIQUE on one combined platform column and the amounts from SUMIFS using those same labels as criteria. An important design choice is to derive both arrays from the same label list, so adding a store cannot shift only one side. Use the same sales measure and time window for each store total.

Fixed formulas used here still cover the same rows if a new file arrives. If the sources grow, convert each into an Excel Table with defined amount and key columns. Check one known append and include the newly typed record in the Table's boundary before trusting the updated summary. If your method has both fixed-range and Table versions in the same workbook, label which outputs are based on each source.

See what padding tells you in a mismatched report

Make a free scratch area and enter =HSTACK(D2:D3,B2). You supplied two labels and only one amount. The result has two rows and two columns, with a #N/A in its second amount slot. The shape tells you a value was absent from the shorter input. In this summary, simply feeding a second amount would still require the key check above. Pad only for layouts where the positions already make sense.

With a known example where D2 is MarketRush and D3 is FreshGo, but only B2 is available, try =HSTACK(D2:D3,EXPAND(B2,ROWS(D2:D3),1,"Not supplied")). The second row explicitly shows Not supplied. That preserves a distinction between a missing subtotal and a measured zero. It also leaves a genuine error in B2 visible to the reviewer. If B2 comes from a lookup that fails, padding only supplies the extra row. It does not erase the original problem.

Now switch D2 and D3 back to the desired FreshGo-first order. Retest the keyed report. For any external totals file, ask whether missing labels should stay on the report with a warning or enter a separate audit. Replacing every issue with a zero would reduce the visible sum and mislead someone about whether a store sent data.

Use named Table fields and define how missing rows are handled

Normalize field order using names

CHOOSECOLS uses the given positions in a particular input. It works when the incoming field order is known. If the person exporting a file rearranges it again, the digits 3, 1 and 2 may now mean something else. Excel Tables let you select specific named fields in the order the report needs. On FreshGo and MarketRush, create Tables with headers and name them tblFresh and tblMarket. Give them the same three field labels as the source grids. Keep the formula outside both Tables.

=LET(freshRows,HSTACK(tblFresh[Order ID],tblFresh[City],tblFresh[Amount]),
     marketRows,HSTACK(tblMarket[Order ID],tblMarket[City],tblMarket[Amount]),
     VSTACK(freshRows,marketRows))

The HSTACK calls deliberately produce the same ID, City, Amount field sequence, from linked columns of the same Table. The source named fields have the same record order because each comes from one Table. VSTACK then appends the normalized blocks. Assuming the source has not changed, this returns ten records, including AMN-1003 with amount 110. If a heading changes in an external source, review its meaning and update the mapping before use. A label called Price may mean item price while Amount means order total.

Filter on record validity with the original source IDs

Suppose a practice export sometimes creates a spacer row with an empty Order ID. Decide whether a record is complete enough to include. In this lesson use the presence of an ID as the inclusion rule, and flag any excluded amounts separately. Testing the original ID fields before assembling arrays avoids depending on how an empty source cell displays after a stack directly references it. A blank referenced in an array can appear as zero. Apply the corresponding source inclusion rule prior to interpreting the displayed ID.

=LET(freshRows,HSTACK(tblFresh[Order ID],tblFresh[City],tblFresh[Amount]),
     marketRows,HSTACK(tblMarket[Order ID],tblMarket[City],tblMarket[Amount]),
     combinedRows,VSTACK(freshRows,marketRows),
     includeRows,VSTACK(tblFresh[Order ID]<>"",tblMarket[Order ID]<>""),
     headings,HSTACK("Order ID","City","Amount"),
     VSTACK(headings,FILTER(combinedRows,includeRows,HSTACK("No orders","",""))))

The inclusion array is formed in the same FreshGo-then-MarketRush sequence as the data. It has one Boolean per data row. If you swap the mask order while leaving the data order unchanged, a TRUE still includes a position but it could refer to a different order. The no-match response is a three-field display row. If a later workflow counts orders, count the valid IDs or adjacent inclusion flags. Counting the display rows would include the heading and possibly the message.

In a scratch copy add a MarketRush row with a blank ID, Pune, and numeric 50. The data-only append without a validity rule contains eleven rows and its numeric sum is 2,920. The keyed complete-record list still contains ten orders and totals 2,870. Call out the excluded amount of 50 and repair the ID at its source. The remaining sum is a validated subtotal, and the excluded row has not vanished. If adding a genuinely blank row, extend the Table intentionally and test that it contains the new part of the sheet.

Mark optional fields without erasing genuine source faults

A training coordinator receives two small exports. A newer export includes the order amount. The older export lacks the amount field entirely for a few records. The target output needs a place to show that lack of coverage. Decide the missing-data policy before combining the blocks. A zero amount says an order's recorded amount is zero. An amount that was never supplied needs a different interpretation.

Reproduce the missing-field shape

On a blank sheet named Padding, put a three-field record in A2:C2 as TR-11, Pune, 70. In E2:F3 type TR-12, Nashik and TR-13, Pune. Assume the first two fields mean Order ID and City in both exports. Do not put an amount in G2 or G3. In I2 enter =VSTACK(A2:C2,E2:F3). Verify three rows and three columns. The first row has amount 70. The third field on each older row has #N/A because the second block has only two fields.

=VSTACK(A2:C2,EXPAND(E2:F3,ROWS(E2:F3),3,"Not supplied"))

In a separate location, try the explicit padding above. EXPAND adds a third field to the older data block. It fills only the cells it adds, so TR-12 and TR-13 display Not supplied in their amount position. The valid ₹70 remains available for the covered-order total. If an error occurs in the input amount of TR-11, that error should remain. A precise display rule distinguishes the absent column from a broken value in a column you actually received.

  • Count three order records. All three have IDs. It is valid to use the combined report for a count.
  • Count one numeric amount. Two orders lack a submitted amount. A chart of total values should disclose that coverage before using the sum.
  • Base average on its stated population. ₹70 is the average of the single recorded amount. Dividing by all three rows under a “per transaction” label would imply a policy on missing values.
  • Apply a calculation only when the columns are ready. A mixed number-and-message display is clear to a person. Prefer a numeric amount field and a separate amount-status field for downstream calculations that expect a number or blank.

Check which field is missing before using trailing padding

A two-column source might contain ID and City, or ID and Amount. EXPAND only adds positions at the end. If the incoming columns are ID and Amount and the schema calls for City in the middle, adding a third position at the end leaves amounts in the City field. Build the correct output columns explicitly. For example, use HSTACK to place the known ID column first, a same-height missing-city column second and the actual Amount column third. Label the missing information without moving a known measure.

Try that variant with E6:F7 holding TR-14, 110 and TR-15, 50. In a free area use the formula below. The IF evaluates one ID per row, producing the same number of labels as records. Read TR-14, No city supplied, 110 and TR-15, No city supplied, 50. A single literal marker added to HSTACK would occupy only the first row and leave default padding for the second.

=HSTACK(E6:E7,IF(E6:E7<>"","No city supplied",""),F6:F7)

Choose missing markers using the report's purpose. In a handoff worksheet a short text label informs a human reviewer. In a filtered numeric data export, document a missing status in a separate field and preserve the ability to compare numbers. A marker also belongs only in expected locations. Check that the same formula still reports an error coming from a genuinely damaged source record.

Keep the same unit of observation across appended arrays

A data set's grain is what one row represents. In the original VSTACK lab, one row represents an order in both exports. If one export contains only city totals, its rows represent groups rather than orders. Append those city rows to the detailed list and a normal COUNT of records no longer means number of orders. SUM can count the same money twice if a city total already includes rows from the other source. Even a perfect match in headings and positions cannot repair that.

Decide how to handle overlapping records

Take the ten-order fixture and add the first MarketRush record AMN-1003 again to a scratch copy of its own block. The append returns eleven records and the total becomes ₹2,980. It correctly appended what you supplied. Ask the data owner whether the repeated ID means a duplicate export, a legitimately repeated order number from a second system, or a second line of the same order.

  1. If the repeated ID is an accidental duplicate of the exact same record, identify and remove it deliberately before sharing a corrected total. Keep the evidence of why it was excluded.
  2. If order identifiers are unique only within a source, keep a platform column and consider the pair of platform and order ID when checking identity.
  3. If each order can include many product rows, an order ID alone is only a grouping field. You may need a line ID and an aggregation to calculate the order totals once.
  4. If the new export has the same ID and a changed amount, do not pick the first row casually. Ask how changes are recorded, and which version date or system provides the current figure.

A single UNIQUE over a complete combined array removes identical rows. It does not decide which row for a repeated ID is current if a field changed. UNIQUE over ID alone can help count distinct IDs, but it discards other fields from its result. Establish your ID rule and scope before assuming a drop in row count represents a verified correction.

Handle the handoff across refreshes

Small worksheet stacks make the calculation and its result visible together. They recalculate from the included worksheet inputs. A recurring folder of files brings other decisions, including how to import each file, clean headings and timestamps, align source types, and refresh. Power Query Append combines rows and aligns columns based on their names. According to Microsoft's Append documentation, a missing source column becomes null in the combined data. Review the incoming headers for spelling or meaning changes before relying on that mapping. The Power Query Append lesson shows that workflow in detail.

The source method changes, but the checks travel. Record the expected count per source, the date range and the amount total by source. Compare those with the combined counts immediately before any duplicate handling. After cleaning, reconcile the difference with specific excluded rows or corrected values. List unresolved data faults. Keep a small known fixture around to catch a future source that reorders fields or changes the amount type.

Practice and answer key

Return to the original seven FreshGo and three MarketRush records. Repeat these exercises in a free output area before editing either sheet. Put a label near each scratch formula to say whether it returns a whole list, a row, an amount or a count. A common mistake is to leave the result of one exercise in the next exercise's intended spill area.

Append both sources without their headings

Use =VSTACK(FreshGo!A2:C8,MarketRush!A2:C4). Expect ten rows and three fields. The seventh result is BLK-1010 and the eighth is AMN-1003. Inspect both sides of that boundary to confirm there was no lost or repeated record.

Return only the count of combined data rows

Use =ROWS(VSTACK(FreshGo!A2:C8,MarketRush!A2:C4)). It returns ten, the sum of the heights. If you had included both header rows you would get twelve, so confirm the selected ranges. An aggregate count is one result and does not spill the ten rows into the worksheet.

Total the third field of the combined list

Use =SUM(CHOOSECOLS(VSTACK(FreshGo!A2:C8,MarketRush!A2:C4),3)). The selected positions correspond to Amount in both input blocks. The expected result is ₹2,870. Try the same check with the Moved block only after putting its columns in schema order.

Include a single heading in the 11-row output

Use =VSTACK(FreshGo!A1:C1,FreshGo!A2:C8,MarketRush!A2:C4). Expect the heading followed by ten data records. Label a later data count accordingly. The size measured by ROWS of the entire output is eleven.

Make a side-by-side summary with no reversed pairing

Put the label array in FreshGo, MarketRush order and calculate their totals in that same order. In the controlled HSTACK formula in Lab 2, you can trace every amount's source. It gives FreshGo 2,333 and MarketRush 537. The test is whether each row matches its store, in addition to summing to 2,870.

Return the highest order across both platforms

Use =TAKE(SORT(VSTACK(FreshGo!A2:C8,MarketRush!A2:C4),3,-1),1). SORT orders the data by its third field, Amount descending. TAKE returns the top row, so the result is BLK-1007, Solapur, 1299. If several orders might tie, ask whether the report needs all tied winners or a specified secondary order.

Diagnose the source of a broken or misleading report

The result cannot spill

Check the intended rectangle from the anchor. A VSTACK from A2 with ten records and three fields needs A2:C11. Data in C11 prevents that output even if the first two fields seem clear. Select the error and investigate the indicated range. Keep the formula outside a Table's body. Move the formula or clear only a known test blocker. An existing result may belong to a different lab, so read its label before removing it.

The report has the right count but the wrong amount

Count numeric amounts and compare source totals separately. Ten data rows and seven numeric amounts in the Moved fixture indicate a positional error or bad types. Inspect one early row and the first row from the second block. A lookup issue in the side-by-side summary can swap the amounts while preserving the grand total. Check the store amounts individually against their source. Correcting the final number format would leave the underlying issue untouched.

The report shows unexpected padding or repeated headings

  • Measure each input independently. Extra columns in VSTACK are filled only for the narrower source. Extra rows in HSTACK are filled only for the shorter source.
  • Find the exact range that provided the second set of column labels. Excluding row 1 from the data selections usually removes those extra labels if each source has one heading line.
  • After correcting the source or mapping, retest the original shape, the record at the boundary between appended lists, and the numeric field coverage. Use the same checks again after an append.

Quiz with explained answers

What shape does VSTACK produce from seven rows by three fields and three rows by three fields?

Ten rows by three fields. It adds input heights and keeps a width large enough for the widest block. Since the source ranges exclude headings, ten is also the record count for the known fixture. If you append a single heading piece, the height rises to eleven without adding an order.

What occurs when an HSTACK puts a two-row label list beside one amount?

It forms two rows and two columns. The bottom amount slot is absent from the smaller input, so the default padding cell is #N/A. That does not prove a missing lookup, because shape alone can produce this error. Inspect both the source amount and the source heights.

What proves the MarketRush amount is in the right field after a reorder?

Read AMN-1003 and then check 110 in the final Amount field. In the complete stack all ten amounts should be numeric. A corrected combined sum of ₹2,870 supplies another check. A three-column output shape cannot distinguish the correct data from a three-column shifted block.

Why can the total 2,870 coexist with a wrong store summary?

Adding ₹537 and ₹2,333 gives the same sum whichever label comes first. A positional HSTACK can pair each amount with the opposite store. Verify each amount against its key, or derive the totals in the same order as the label list before combining them.

How many orders does a combined view with one header and ten data rows contain?

Ten. A ROWS check over the whole display gives eleven because a header occupies a row. Count valid IDs or the data-only region when the report label says number of orders. A display row may also contain a no-match message in another state.

Which input should be checked to remove a row with a blank order identifier?

Check the original source IDs, then stack the Boolean decisions in the same order as the combined data. The source test distinguishes an empty ID from a number that may appear after materializing a blank reference in an array. Flag any known amount on that excluded record for later repair.

Interview questions you can answer from practice

What is the difference between stacking and a lookup join?

Stacking rearranges arrays by source position. A lookup locates the matching value using a key. In the report I would align the two amount values to the requested stores using an exact lookup, then HSTACK the labels and aligned amounts. In an append I would check field order before using VSTACK.

How would you prove an append kept both sources intact?

I would check each source’s record count, its amount total and its last and first IDs at the join boundary. Then I would compare the same checks on the combined result and count numerically valid amounts. I would confirm the first MarketRush order follows the last FreshGo order with its ID and amount fields intact.

How would you represent a missing field without suppressing a source error?

Define which source lacks which field. If an otherwise compatible block lacks the final field, EXPAND can add that position with a clear marker. If the missing field belongs in the middle, build the desired column order explicitly. Existing source errors need their own investigation and should remain visible.

When might you move a repeated append from worksheet formulas to Power Query?

A worksheet formula is helpful for a small set of already-clean blocks. Recurring imports may need column normalization, type conversion, file-level audit and saved refresh steps. Power Query Append matches column names and fills missing columns with null. I would still verify source grain, incoming names and missing value policy.

Why is removing repeated IDs a separate decision from appending?

VSTACK lists what was supplied. A repeated identifier could be a duplicated export, reused within a different source or repeated across product lines. Ask what one row represents and what makes it unique. Only apply a deduplication rule after checking that those records really duplicate the same observation.

Revision cards

  • VSTACK appends records. Add the heights and keep the largest width.
  • HSTACK adds fields. Add widths and use the largest height.
  • Agree on positions. Give stacked inputs the same field order, and put matched records beside each other.
  • A clear missing marker. Missing information needs a defined policy. Actual source errors deserve their own check.
  • One header if needed. Keep ordinary records and display labels distinct when counting and summing.
  • Check rows, types and totals. A correct grand total alone cannot detect a swapped pair.

Microsoft references