Currently I am experimenting with dynamic search bars and filtering in Excel. I have found a nice tutorial that uses a table and Active-X text box. I have recreated it and surely it works. My problem however is that it only takes into account one column. Now, I have created another table and another search bar, thinking that it would work just as fine, however, for some reason it does not. Here is the problem: The data set looks like this; Searching for cells containing "1" in "addr1"(works normal): Searching for cells containing "1" in "addr2"(does not work):
I have tried setting the format to Text, general, number etc. but nothing seems to have any effect. The second search should list the cells containing "123" as well but it doesn't.
VBA Code in the Sheet:
Private Sub TextBox1_Change() ActiveSheet.ListObjects("address1").Range.AutoFilter Field:=1, Criteria1:="*" & [A1] & "*", Operator:=xlFilterValues End Sub Private Sub TextBox2_Change() ActiveSheet.ListObjects("address2").Range.AutoFilter Field:=1, Criteria1:="*" & [B1] & "*", Operator:=xlFilterValues End Sub
Anybody has any solution?
Thank you for any feedback!