I currently have a macro, that goes through our employee list, if their tip value = 0, it hides that line. I have it hard coded where it will do this for 138 lines (current number of employees).
I find that as our employee number changes, I have to constantly go in, and edit this macro code, and was wondering if there is a way to search for the last employee name (Zycher) and use that line number in the code.
So basically, I'd have to seach for Zycher, figure out what line number his name appears, that assign that line number to an integer or whatever and use that in the For count line if possible (For count = 5 to $Zycher)
This is the code I currently have:
Sub hide()
Dim count As Integer
For count = 5 To 138
If Cells(count, 11).Value < 1 Then
Rows(count).Hidden = True
End If
Next
End Sub
Thanks in advance as always.
I find that as our employee number changes, I have to constantly go in, and edit this macro code, and was wondering if there is a way to search for the last employee name (Zycher) and use that line number in the code.
So basically, I'd have to seach for Zycher, figure out what line number his name appears, that assign that line number to an integer or whatever and use that in the For count line if possible (For count = 5 to $Zycher)
This is the code I currently have:
Sub hide()
Dim count As Integer
For count = 5 To 138
If Cells(count, 11).Value < 1 Then
Rows(count).Hidden = True
End If
Next
End Sub
Thanks in advance as always.