Wildcard character not behaving as expected...

Matty

Well-known Member
Joined
Feb 17, 2007
Messages
3,717
Hi,

I'm perplexed (not unusual for me!). Why does the following return FALSE? :confused:

A1: Matty1
A2: ="Matty"&"?"=A1

If I use "Matty"&"?" within a MATCH formula, it behaves as it expected, with the value being found.

Thanks,

Matty
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
You cannot use Wildcards in a concatenation formula like that. It treats the question mark as literal text.

You can confirm this pretty easily for yourself. Just type the following in any cell and see:
="Matty" & "?"

If you wanted to see if a cell began with "Matty", I would use:
=IF(LEFT(stringvalue,5)="Matty",...,...)
 
Upvote 0
try it like this
Excel Workbook
A
4Matty1
5TRUE
Sheet4
Excel 2003
Cell Formulas
RangeFormula
A5="Matty"=LEFT(A4,LEN(A4)-1)
 
Upvote 0
Thanks Chaps.

I suspected this to be the case, but wanted to be sure I wasn't just missing something obvious!

I'd already considered the LEFT route and will now employ this option...

Thanks again.

Matty
 
Upvote 0
Hi,

I'm perplexed (not unusual for me!). Why does the following return FALSE? :confused:

A1: Matty1
A2: ="Matty"&"?"=A1

If I use "Matty"&"?" within a MATCH formula, it behaves as it expected, with the value being found.

Thanks,

Matty
Here's another one...

=COUNTIF(A1,"matty*")>0
 
Upvote 0

Forum statistics

Threads
1,224,551
Messages
6,179,470
Members
452,915
Latest member
hannnahheileen

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