I have a problem with a macro, I want apply a filter on a field so that when I enter a value from the keyboard, the filtering is done with a condition "other than" cthis setting, for example: when I 'uses a preset such as: Selection.AutoFilter Field:=6, Criteria1:="<>2 , filtering in this case will be made based display any value different from 2.
I do not want a constant value "2" but a value that is entered from the keyboard example:
X = InputBox ("...")
Y = Val(x)
Selection.AutoFilter Field:=6, Criteria1:= "<>y"
Criteria1:="<>" & y Thanks to chossette9 for this tip.