jbesclapez
Active Member
- Joined
- Feb 6, 2010
- Messages
- 275
Hello,
I have this formula :
I can not make it work. If i hard code the criteria it is fine.
The value of the LastRowKTemp is 7, i checked that; It's fine.
When i use that formula, it is doing something
Selection.AutoFilter Field:=2, Criteria1:="<>" & Worksheets("Temp").Range("B2").Value
But as you can see the Criteria is not the one I want.
Then I started using the advanced filter :
And the filter is working so I try to make it dynamic using that :
And then it is not working.
Please guide me to a solution.
Thanks
I have this formula :
Code:
Selection.AutoFilter Field:=2, Criteria1:="<>" & Worksheets("Temp").Range("B2:B" & LastRowKTemp).Value
I can not make it work. If i hard code the criteria it is fine.
The value of the LastRowKTemp is 7, i checked that; It's fine.
When i use that formula, it is doing something
Selection.AutoFilter Field:=2, Criteria1:="<>" & Worksheets("Temp").Range("B2").Value
But as you can see the Criteria is not the one I want.
Then I started using the advanced filter :
Code:
Range("A30:F171").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=Range("A1:F7"), Unique:=False
HTML:
Range("A30:F171").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=Range("A1:F" & LastRowKTemp), Unique:=False
And then it is not working.
Please guide me to a solution.
Thanks