← All how-to recipes

How to combine two lists without duplicates

✓ Verified in LibreOffice 25.8.7.3

Merge two columns into one list where each value appears only once.

The formula

AppFormulaNotes
Excel=UNIQUE(VSTACK(A2:A4,C2:C3))Excel 365. VSTACK stacks the ranges; UNIQUE dedupes the result.
Google Sheets=UNIQUE({A2:A4;C2:C3})Sheets uses {range1;range2} array literals instead of VSTACK (though VSTACK also works).
LibreOffice Calc=UNIQUE(VSTACK(A2:A4,C2:C3))Needs LibreOffice 25.8+ (VSTACK); UNIQUE alone needs 24.8+.

How it works

VSTACK places the second range under the first (apple, banana, apple, banana, cherry) and UNIQUE removes the repeats, leaving each value once. The output is live — edits to either source list update the merged result. In Google Sheets the {A2:A4;C2:C3} literal does the stacking; the semicolon means "stack vertically" (locale note: some European locales swap ; and , in array literals).

Verified, not just documented

We ran =UNIQUE(VSTACK(A2:A4,C2:C3)) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned apple, banana, cherry — exactly the expected result. Every formula here is confirmed by actually executing it.