Filter desired columns

elsg

Active Member
Joined
Mar 16, 2013
Messages
295
Hi.
I have data in columns "A: K"
How do I filter out only the "C: K"?
Don't work!
Code:
Sub TestFilter()
    Sheets("Plan1").Range("B11:J3000").ClearContents
   With Plan1
        .AutoFilterMode = False
        .Columns("A:B").EntireColumn.Hide = True
        .Range("C1:K1").AutoFilter Field:=9, Criteria1:="Presente"
        .Range("C1:K1").CurrentRegion.Copy Destination:=Plan4.Range("B10")
        .Range("C1:K1").AutoFilter
   End With
End Sub

thank you!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
If you mean that when you filter only C:K, and rows 4:7, for instance, are hidden, that they remain visible in A:B, this is not possible. A filter, when applied, hides an entire row, not just part of it (ie not just rows in certain columns)
 
Upvote 0
Hi.
I want to filter and copy only the columns "C: K"


how I do it using my code?
 
Upvote 0

Forum statistics

Threads
1,213,506
Messages
6,114,027
Members
448,543
Latest member
MartinLarkin

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
Back
Top