see attached sheet - next comment. cell A1 calculates the column number (0-based!) of the filtered column in the database range C2:E16 by the macro call 'getfilterdescriptor'.
(F9 is needed for recalc of A as it‘s a macro ‚function‘, thus excluded from autocalculate? or ist the exclusion reg. lack of info when variables for calculation change?)
the value is wrong when the sheet is loaded with autofilter active - that's the bug, it becomes correct once you switch autofilter off and back on.
it‘s needed to have one column filtered, otherwise error.
My assumption after some tests: on fresh loaded sheet ‚getfilterdecriptor‘ calculates 'startcolumn of databaserange minus startrow of databaserange plus column in databaserange' ommitting 'startrow' if it's > 'startcolumn'.
i've asked for this problem in 'ask', no answer, and initiated a thread in a german forum, no solution, searched the web, no solution.
if someone can point me to the module where this calculation is done (where getfilterdescriptor is defined), the variables used there, and the logical path from the macro and it's variables to the module i'll try to look in the code ~ frightened!!! ~ a simple text search produced some results, but without knowledge about the structure and connections of the modules I feel helpless at first ...
Steps to Reproduce:
see description above and steps in the attached sheet,
wrong calculation (wrong value for 'field' fetched by 'getfilterdescriptor') on sheets loaded with active autofilter, works better after off - on cycle for autofilter
same results on fresh loaded sheets as later on,
User Profile Reset: Yes
bug active since years, will update earliest affected after recheck, actual tested 220.127.116.11.a0+ from 2020-04-15, self compiled, sorry, ctrl-c ctrl-v to copy detailed info doesn't work (kali - debian - linux)
Created attachment 159584 [details]
testsheet with macro function to check results of call 'getfilterdescriptor'
oldest version i had to test was 18.104.22.168, has problem with this macro, but doe's miscalculations with getfilterfields either, applying a new set filter - set by macro - one column left to the intended, healed after autofilter off and back on,
i assume inherited from OOo ... ???
I also want to make a slide show for my site of https://thaiharempants.net/
it boils down to something being unclear about the use of the flag/tag 'table:orientation="column"', described there:
as of now that's the main problem to be solved, thus setting this duplicate,
*** This bug has been marked as a duplicate of bug 133529 ***