wildcards in formulas

G

Guest

How do I get a formula to include a wildcard?

For example, the remarks on the MATCH function say:

If match_type is 0 and lookup_value is text, lookup_value can contain the
wildcard characters asterisk (*) and question mark (?). An asterisk matches
any sequence of characters; a question mark matches any single character.

So I created a spreadsheet, and put the word "bananas" in cell b2.

I then find that =MATCH("bananas",b1:b5,0) gives me 2
But =MATCH("ba*s",b1:b5,0) gives me #N/A, and taking the asterisk out of the
quotes (=MATCH("ba" & * & "s",b1:b5,0), for example), gets me a formula error.

So what's the proper syntax for getting that asterisk in there?
 
B

Bob Phillips

That is the proper syntax, and works perfectly for me. You don't have a
trailing space by any chance?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top