macro that prints visible area after filter in excel

后端 未结 2 1537
没有蜡笔的小新
没有蜡笔的小新 2021-01-27 06:20

I have a macro that filters the table based on column A values. Now I want to print only the visible rows after the filter, but sadly it prints all

2条回答
  •  离开以前
    2021-01-27 07:14

    Finally, this code worked! :) Thanks to all!

      ActiveSheet.PageSetup.PrintArea = Range("C3:I" & lastrow).Rows.SpecialCells(xlCellTypeVisible).Address
    

提交回复
热议问题