Generate a list of unique items from list

Since decades, a well proven method to create a list of unique items goes like this:
Having a database-like list with one top row of column labels and consistent data below each label, you select the list and call Data>Pivot>Create… In your sample, all you need is a column label on top of your names in order to fulfill this reqirement.
In the upcoming wizard, you drag the name column into the “Row fields” box (one row per item. This creates a pivot table representing the list of unique items from the source column. Data>Pivot>Refresh or “Refresh” from the context menu refreshes this list while the cell cursor is within the pivot table.
In order to include the text field, right-click>Edit recalls the wizard, where you drag the text field into “Row fields”. Now you have a list of all unique combinations of name and text.
Drag “Total values” to “Data fields” and you get a third column showing the sum of that column for each unique combination of name and text.
Drag “Maximum” to “Data fields”, change “sum” to “max” and you get a forth column showing the max of that column for each unique combination of name and text.

Recently a menu item Data / Duplicates… (similar to Excel) appeared.

In addition to the unique names, @danix wants aggregated numbers for each name.

P.S. and selecting duplicate items does not help when you need a list of unique items. This new feature looks questionable anyway.

1 Like

This is achieved using the Remove action.

Hello, @karolus !
I’ve added a button to your example that recalculates the document formulas and then regenerates the array formula in cell C1. The macro has been modified.
Currently, I don’t see any errors in the calculation results.

resize_arrays_2.ods (17.2 KB)

P.S. Thanks for the examples. I’m learning the Python / UNO combination using your texts (and MRI). :slight_smile: