filter columns A:C only

SQUIDD

Well-known Member
Joined
Jan 2, 2009
Messages
1,998
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hello All

I am wondering if it is possible to filter just column A:C starting at row 2.
But here's the tricky part.
I want the data in column D:K to remain so the filter does not remove it.

Possible?

Hope it makes sense, if not let me know.
Below is my code so far, but this removes the data I have stored in columns D:K that I wish to remain.

Code:
Sub FILTER()
A = Month(Date)
    ActiveSheet.Range("$A$2:$C$367").AutoFilter Field:=1, Operator:= _
        xlFilterValues, Criteria2:=Array(A, "1/31/2017")
    ActiveWindow.SelectedSheets.PrintOut Copies:=2, Collate:=True, _
        IgnorePrintAreas:=False
    ActiveSheet.Range("$A$2:$C$367").AutoFilter Field:=1
End Sub


Dave
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Sektor

Well-known Member
Joined
May 6, 2011
Messages
2,874
Office Version
  1. 365
Platform
  1. Windows
AutoFilter hide the entire row - you can't hide some cells.
 

SQUIDD

Well-known Member
Joined
Jan 2, 2009
Messages
1,998
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hi Sektor

I thought as much.

ok, I will write a code to copy the range on the right to an new sheet.
then return, filter the data, copy filtered range to the new sheet etc

thanks for looking

Dave
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,682
Messages
5,838,787
Members
430,569
Latest member
sbardelli

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top