ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Applying second filter and set print area (https://www.excelbanter.com/excel-programming/275945-applying-second-filter-set-print-area.html)

Soniya

Applying second filter and set print area
 
Hi all,

I have seven column(A:G) data starting from row2 as
label and from row 3 onwards data, which would be
filtered on column 7. I want to apply a second filter
from this filtered data on column 2 and then set print
area as the filtered range less one column (A:F)

how can I do this with code?

TIA

Soniya

Tom Ogilvy

Applying second filter and set print area
 
Application.AutoFilter.Range.Autofilter Field:=2, Criteria1:="ABCD"
Activesheet.PageSetup.PrintArea =
Application.Autofilter.Range.Resize(,6).Address

--
Regards,
Tom Ogilvy

"Soniya" wrote in message
...
Hi all,

I have seven column(A:G) data starting from row2 as
label and from row 3 onwards data, which would be
filtered on column 7. I want to apply a second filter
from this filtered data on column 2 and then set print
area as the filtered range less one column (A:F)

how can I do this with code?

TIA

Soniya





All times are GMT +1. The time now is 05:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com