filter columns A:C only

SQUIDD

Well-known Member
Joined
Jan 2, 2009
Messages
1,690
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
 

Some videos you may like

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Sektor

Well-known Member
Joined
May 6, 2011
Messages
2,834
AutoFilter hide the entire row - you can't hide some cells.
 

SQUIDD

Well-known Member
Joined
Jan 2, 2009
Messages
1,690
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
 

Watch MrExcel Video

Forum statistics

Threads
1,123,321
Messages
5,600,950
Members
414,417
Latest member
Nobu

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