REMOVEDUPLICTAES functionality

Im looking for a simple Basic macro that does exactly what (‘MS’) RemoveDuplicates does. Ive played around with createFilterDescriptor & filter(oFilterDesc) for most of last night and today, it just doesnt want to play ball.
I’ve 5k account codes (string) is column ‘A’. If i do it thru the UI, i end up with a list of around 150. The 150 ‘feels’ correct. I just can’t replicate the code in a macro.

Version: 24.2.6.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Ubuntu package version: 4:24.2.6-0ubuntu0.24.04.1
Calc: threaded

Any help would be appreciated.

And for bonus points, why is there TableFilterField, TableFilterField2 and TableFilterField3. How do i know when / which one to use.

thx Team.

Data>Filter>More>Standard Filter…
Define the columns that make up a duplicate and choose < not empty > as criterion for each of them.
Under “Options” choose “No duplicates”.

For a working macro, inspect the FilterDescriptor you have generated with the above steps.

A ‘Handle Duplicate Records’ dialog was added in 25.2 to select/remove duplicate records in Calc.

Thanks and Merry Christmas, MikeKaganski. But still on 24.

The new function was implemented in frame of tdf#85976. Starting from comment 8 there, it discussed “Remove Duplicates” extension (and in comment 15, its improvement “Remove Duplicates Fast”). You may install either, and inspect their code (both are written in Basic).

But in general, your original question asks exactly this: “I’m looking at some code; help me with what I don’t show you”.

Thx again.