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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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,214,795
Messages
6,121,624
Members
449,041
Latest member
Postman24

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