Filter issue

christchaaya

Board Regular
Joined
Apr 5, 2013
Messages
86
Hello everyone.

I ran this code and it worked great until I took a look at the table and the filter on the headers were disappeared:confused::confused: . I thought that the table has converted into a range but nope ... What could be the problem? Did i made mistakes in the code ?

Code:
R
dim x as range
dim y as filter
nge("IV3").End(xlToLeft).Select
    Set x = ActiveCell
    ActiveSheet.ListObjects("Tabla1").Range.AutoFilter Field:=11, Criteria1:=x
    ActiveSheet.ListObjects("Tabla1").Range.AutoFilter Field:=5, Criteria1:="permiso sindical*"
     On Error Resume Next
    Set y = ActiveSheet.ListObjects("Tabla1").Range.AutoFilter
    On Error GoTo 0
    If Not y Is Nothing Then
    Range("p" & Cells.Rows.Count).End(xlUp).Select
    Range(Selection, "p12").SpecialCells(xlCellTypeVisible) = "x"
    ActiveSheet.ListObjects("Tabla1").Range.AutoFilter Field:=5
    End If
    ActiveSheet.ListObjects("Tabla1").Range.AutoFilter Field:=5, Criteria1:="Reunion solicitada por empresa*"
    On Error Resume Next
    Set y = ActiveSheet.ListObjects("Tabla1").Range.AutoFilter
    On Error GoTo 0
    If Not y Is Nothing Then
    Range("q" & Cells.Rows.Count).End(xlUp).Select
    Range(Selection, "q12").SpecialCells(xlCellTypeVisible) = "x"
    ActiveSheet.ListObjects("Tabla1").Range.AutoFilter Field:=11
    ActiveSheet.ListObjects("Tabla1").Range.AutoFilter Field:=5
    End If
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,215,039
Messages
6,122,799
Members
449,095
Latest member
m_smith_solihull

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