I have hundreds of excels with data in them. It would take way too long to press insert > Table > ok -> Filter > number filter between range -1 and 1 for all of them.
Excel looks like:
Date Client A Client B % $ Other Misc Data #
11/11/ Bob Hond 33 $40 N/A N/A N/A 0
12/11/ Jack Jase 3 $40 N/A N/A N/A 2
etc,,
UPDATED FINAL
Thanks Siddharth Rout!!
My Final code is below. I will continue to test it to ensure there are no bugs but I was able to do all I requested before.
Sub Auto_Close()
'
' Macro2 Macro
'
'
With Sheets("Sheet1")
If Application.WorksheetFunction.CountA(.Cells) <> 0 Then
lastRow = .Cells.Find(What:="*", _
After:=.Range("A2"), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
Else
lastRow = 1
End If
End With
Range("A2").Select
ActiveSheet.ListObjects.Add(xlSrcRange, , xlYes).Name = _
"Table1"
Range("Table1[#All]").Select
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=9, Criteria1:= _
">=VALUE", Operator:=xlAnd, Criteria2:="<=VALUE"
End Sub
I used this in combination with a VBSCRIPT and it worked like magic. Cheers