Autofilter character limit in cell to search?

jpkeller55

New Member
Joined
May 27, 2004
Messages
11
Does anybody know if there is a character limit for an autofilter search in Excel 2003? I am using the code below on a button that a user can input filter criteria for a cell that contains the input string. However, it looks like the filter is not finding strings in cells when the string is past 250 characters or so. Is this known and is there a work around? Thanks for any help.

Code:
'Variables used by the macro
Dim FilterCriteria
Dim CurrentFileName As String

'Get the current file's name
CurrentFileName = ActiveWorkbook.Name

On Error Resume Next
ActiveSheet.AutoFilterMode = False
On Error GoTo 0
'Apply Autofilter
Range("A2:z10000").AutoFilter
'Get the filter's criteria from the user
FilterCriteria = InputBox("Enter Drug Name")
If FilterCriteria = "" Then Exit Sub
FilterCriteria = Replace(FilterCriteria, "*", "")
FilterCriteria = "*" & FilterCriteria & "*"
'Filter the data based on the user's input
Range("A2:z10000").AutoFilter field:=16, Criteria1:=FilterCriteria, Operator:=xlOr, Criteria2:="=UNIVERSAL"
 

Some videos you may like

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Watch MrExcel Video

Forum statistics

Threads
1,122,564
Messages
5,596,875
Members
414,106
Latest member
Tigretto

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
Top