Is this Autofilter Search behavior documented anywhere?

UniMord

Active Member
Joined
May 6, 2002
Messages
311
I've noticed that when I enter a search string in Autofilter's main Search box (not the Text Filters), and I end the string with *, it becomes the equivalent of "Begins with".
For example, 3 Main will match 123 Main, 23 Main, and 3 Main. But 3 Main* will only search for items beginning with 3 Main, and exclude 123 Main or 23 Main.

(This is not normal * behavior, as you can test for yourself in Autofilter's Text Filters.)

Is this documented anywhere? Why does it behave this way? Are there any other special characters that affect the Search box's behavior?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
That's what I would expect as well, but, as far as I can tell, that's not what's happening. Yes, in Autofilter's Text Filters, the standard wildcards work normally. But, in the main Search box, wildcards don't work at all. The behavior that seems strange to me is, that when I end the search string with an asterisk, it treats the search as a "Begins with" search.
 
Upvote 0
OK, I see what you mean.

I must be strange because I thought it would work like Begins With but the Find box doesn't does it? It kind of assumes a leading asterisk.

Sorry, I have not seen another guide.

regards,
 
Upvote 0
Perhaps I'm not understanding what you are saying but it makes sense to me.

When you begin typing in the box, Excel assumes a 'Contains' search, so "3 Main" does match all those items you mentioned.
As soon as you type the asterisk at the end ("3 Main*"), Excel effectively says "OK, this person wants to use wildcards & they haven't used one at the beginning, so they must want the 'Begins With' filter."

If you then move the insertion point back to the beginning and type

- another asterisk ("*3 Main*") then the filter again changes to a 'Contains' type & all items are returned.

- a question mark ("?3 Main*") then of the items you mentioned, only "23 Main" would be returned.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,929
Messages
6,122,314
Members
449,081
Latest member
tanurai

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