Seandobson2402
New Member
- Joined
- Feb 9, 2018
- Messages
- 23
Hi Guy,
Still getting to grips with VBA and I'm wondering if anyone can help me with the below code.
Instead of filtering to row 10841, I would like to locate the last row and use this. My data will get higher that 10841 rows and I don't want to have to keep increasing the number.
Still getting to grips with VBA and I'm wondering if anyone can help me with the below code.
Instead of filtering to row 10841, I would like to locate the last row and use this. My data will get higher that 10841 rows and I don't want to have to keep increasing the number.
Code:
Private Sub FilterEmployees()
ActiveSheet.Range("$A$1:$F$10841").AutoFilter Field:=4, Criteria1:=Array( _
"Name 1", "Name 2", "Name 3", "Name 4"), Operator:= _
xlFilterValues
End Sub