quite old question, sorry, don’t think OP is still waiting, but similar request may occur once and a while …
i had the same wish, had a easy solution in ex$el long time ago and tried to construct similar for LO … it was ‘not so easy’ …
try to use code below, should be quite near to OP request,
disclaimer: provided ‘as is’ as a sample for own work, without any warranty expressed or implied to the extend permitted by law,
known shortcomings:
zero resp. “” values, empty cells,
numeric vs. alphanumeric filtering, esp. for cols with mixed datatypes, or e.g. text ‘03’ vs. number 3 formatted with ‘two leading zeroes’,
errors in column adjustment for files saved and reloaded with autofilter active,
some old stuff in code from attempts to manage difficult datatypes, kept as reference, will remove once the changes have proved successful for some time,
try to improve code, i’d be happy,
my ‘system’: keyboard shortcuts, alt-F1 to toggle Filter on / off, alt-F2 to filter / unfilter actual column with value of actual cell, alt-F3 to step forward, shift-alt-F3 to step backward in the list of values … fine …
i provide the macro as an attachement because this editor consequently messes up my code formatting in an attempt to save whitespace?
sub_datasurfer_macro.doc