Search box to include numbers AND letters

Krown

New Member
Joined
Dec 18, 2023
Messages
12
Office Version
  1. 2016
Platform
  1. Windows
I made a search box for my worksheet but it seems to only recognize symbols and numbers, but I need it to include letters. How can I do this?

Private Sub Textbox2_Change()

Application.ScreenUpdating = False

ActiveSheet.ListObjects("Antibodies").Range.AutoFilter Field:=4, Criteria1:="*" & [D2] & "*", Operator:=xlFilterValues

Application.ScreenUpdating = True

End Sub
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
What is in cell D2? Give an example of a string that you want it to find, but it is not finding.
 
Upvote 0
What is in cell D2? Give an example of a string that you want it to find, but it is not finding.
Example: $202001602404000090IM2708U

If I search for this, it only understands up to the start of letters. If I search for $202001602404000090, it will take me to that. But with the whole string including IM2708U, it will not find it. This is a 3D barcode being scanned so I need to entire thing to be searchable.
 
Upvote 0
I'm still not clear on this. You are saying that D2 has
$202001602404000090IM2708U
and there is a cell under Antibodies that has the same string
$202001602404000090IM2708U
but the Filter operation
VBA Code:
Criteria1:="*" & [D2] & "*"
is not finding it?
 
Upvote 0
I'm still not clear on this. You are saying that D2 has
$202001602404000090IM2708U
and there is a cell under Antibodies that has the same string
$202001602404000090IM2708U
but the Filter operation
VBA Code:
Criteria1:="*" & [D2] & "*"
is not finding it?
Now it seems to be working so I'm not sure what happened. Thanks for you response though!
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top