kansfan2001
New Member
- Joined
- Aug 22, 2020
- Messages
- 21
- Office Version
- 365
- Platform
- Windows
Hello,
I'm sure this is an easy one. I am looking to sort a list I have created based off of what I input into Cell B2 (shown in yellow on sorting a list jpg.). But I am not sure what I need to put at the :="Carlos" to always reflect the what is in B2 that way I can search for for Melissa and not Carlos yet not having to change the VBA each time I look for a now person on the list.
Thanks for the help in advance YOU ROCK!
I'm sure this is an easy one. I am looking to sort a list I have created based off of what I input into Cell B2 (shown in yellow on sorting a list jpg.). But I am not sure what I need to put at the :="Carlos" to always reflect the what is in B2 that way I can search for for Melissa and not Carlos yet not having to change the VBA each time I look for a now person on the list.
VBA Code:
Sub FindName()
'
' FindName Macro
'
'
Range("B2").Select
Selection.Copy
ActiveSheet.ListObjects("FighterNames").Range.AutoFilter Field:=1, Criteria1 _
:="Carlos"
End Sub
Thanks for the help in advance YOU ROCK!