=SORT(UNIQUE(FILTERXML("<t><s>" & SUBSTITUTE(TEXTJOIN(",",TRUE,A2:B6),",","</s><s>") & "</s></t>","//s")))
This formula is for combining multi columns in one column.
I need to apply above formula for visible cells only. "a" is filtered in "A" column but still present in the results.
After the filter operation in "A" column, "a" is still left in the result column (D column). In other words, after filtering on one of the columns (A or B), I want calculations in column C to be performed on visible cells only.
This formula is for combining multi columns in one column. I have MS Excel 2021.
Before Filtering

After Filtering
