I have this code and its working all perfect not sure why it is not filtering the data, can this be fixed.
VBA Code:
Sub PPT3()
Dim Fpath As String
Dim oFolder As Object, oFile As Object, i As Integer
Dim yDir As String
Fpath = ActiveWorkbook.Path & "\" & "Gaming Region RawFile"
Workbooks.Open Filename:=Fpath & "\" & "Gaming_per-region-kpis.csv"
Range("o1").Formula = "=MAX(A2:A50000)"
Dim lRow3 As Long
Dim lColumn3 As Long
lRow3 = Range("A1").End(xlDown).Row
lColumn3 = Range("A1").End(xlToRight).Column
Cells(lRow3, lColumn3).Select
Range("a1").Select
Selection.AutoFilter
Range("A1").Select
On Error Resume Next
ActiveSheet.Range("A1" & lRow3).AutoFilter Field:=1, Operator:= _
xlFilterValues, Criteria2:="<>" & Array(1, Range("o1").Value) ' Here its not filter the data.
'xlFilterValues , Criteria2:="<>" & Array(1, Range("o1").Value)
Range("A1:G" & lRow3).Offset(1, 0).SpecialCells(xlCellTypeVisible).EntireRow.Delete
Selection.AutoFilter
[ATTACH type="full"]99395[/ATTACH]
End Sub