Consolidate Calc Tables by Matching Labels When Their Row Orders Differ
Two worksheets can contain the same categories in different row orders. Combining the second row of each sheet by position could add keyboards to monitors simply because they occupy the same location. Decide which labels identify equivalent records before using Calc's consolidation command.
Make a working copy and choose a blank destination area. Inspect category spelling, units and reporting periods in every source. Matching labels do not make incompatible measurements safe to add, and a source already containing another source's totals can lead to double counting.
Include the labels in each source range
Open Data, Consolidate. Add each intended source range to the consolidation list and inspect the list for accidental duplicates. Include the label column or row in those ranges when you intend to match by labels.
Choose the aggregation function deliberately. Sum suits quantities that can be added; another function may be appropriate for a different question. Set the output location to the prepared blank area so the result does not overwrite a source table.
Under the additional settings, choose Row labels or Column labels according to the layout. LibreOffice requires identical label text for a match. An unmatched label becomes another result row or column rather than being silently treated as the category you had in mind.
Prove the alignment with a reversed pair
For a small test, let one source contain Keyboards 4 and Monitors 2. Let the other list Monitors 3 first, then Keyboards 6. Label-based sums should produce ten keyboards and five monitors despite the reversed order.
Introduce a deliberately different label in the test and observe that it needs review. Do not automatically merge similar category names without confirming they represent the same thing.
Decide whether the result should link to source data or remain the values produced now. Calc's linking option uses formulas so source-value changes update the destination. Verify that choice with a harmless source change in the copy, then restore the test value.
Reconcile each real category and the overall total before issuing the result. Retain the source-range inventory and label conventions so the next reporting period can be consolidated using the same meaning, rather than whichever rows happen to line up.
Reference: LibreOffice documentation.