I've got a database and I want people to be able to type in their initials and have only the rows that apply to that person remain. This is what I have so far:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("a2") = "" Then
Worksheets("Proposed").AutoFilterMode = False
Else
If Not ActiveSheet.AutoFilterMode Then
ActiveSheet.Range("a2:m40000").AutoFilter
End If
Selection.AutoFilter Field:=3, Criteria1:="*" & Range("a2").Value & "*"
End If
End Sub
The cell where the employee will be typing their initials is A2 and I need it to at least search the columns A, B, C, L, M, and N. It should then display the entire row where the initials were found. I've got it where I can do that, but with only one row. I have been trying to play around with the Field in the Selection.Autofilter to add fields, but have had no luck.
Thanks!
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("a2") = "" Then
Worksheets("Proposed").AutoFilterMode = False
Else
If Not ActiveSheet.AutoFilterMode Then
ActiveSheet.Range("a2:m40000").AutoFilter
End If
Selection.AutoFilter Field:=3, Criteria1:="*" & Range("a2").Value & "*"
End If
End Sub
The cell where the employee will be typing their initials is A2 and I need it to at least search the columns A, B, C, L, M, and N. It should then display the entire row where the initials were found. I've got it where I can do that, but with only one row. I have been trying to play around with the Field in the Selection.Autofilter to add fields, but have had no luck.
Thanks!