Sub 记录筛选条件()Const n = 2Doi = i + 1If Cells(i, 1).EntireRow.Hidden = False ThenK = K + 1End IfLoop Until K = 2Cells(1, "g") = Cells(1, "g") & "," & Cells(i, "a")End Sub将每次筛选条件,记录在G1单元格,用逗号分开。第1行为标题,筛选条件在A列
可以的,具体要看需求来定制代码