问题
Lets say that we have a table in excel. And someone applies a filter using ui (from the arrow in one column) to the whole table.
So from this filtered table i want to textjoin a column (the filtered rows).
Lets say we have table1 and i want to text join column Language.
if i use function
=TEXTJOIN(",";1;Table1[[#Data];[Language]])
the result joins all the rows of the column irrelevant if it is filtered, and subtotal i think can not work here.
What can i do so i can join all rows from a filtered table so everytime the filter changes the result of the textjoin will change?
So lets say that this is the column that i want to textjoin and someone filters out the first and the third row. So i want the textjoin to ignore these rows
回答1:
i think this will do it:
=TEXTJOIN(",";1;IF(SUBTOTAL(103;OFFSET(Table1[[#Data];[Language]];ROW(Table1[[#Data];[Language]])-MIN(ROW(Table1[[#Data];[Language]]));;1))=1;Table1[[#Data];[Language]];""))
where the subtotal with the offseet filters out role by role if something is hidden and returns the proper fields so textjoin works
来源:https://stackoverflow.com/questions/59683992/textjoin-a-prefiltered-table-in-excel