Arlen Beiler
Arlen Beiler

Reputation: 15886

What is the significance of the question mark in Excel?

If I type in this formula:

=vlookup(A1,LetterTable,2,False)

With A1 set to "?" (without the quotes), and LetterTable contains this:

a   a
b   b
c   c
...  ...
-   -
+   +
?   ?
!   !

It always gives me "a" (no quotes). Why is this?

Also, if I copy that into an array in vba and loop through it, comparing it to the spreadsheet value, it won't find it either.

Upvotes: 2

Views: 14843

Answers (1)

rskar
rskar

Reputation: 4657

See http://office.microsoft.com/en-us/excel-help/vlookup-HP005209335.aspx:

If range_lookup is FALSE and lookup_value is text, then you can use the wildcard characters, question mark (?) and asterisk (*), in lookup_value. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) preceding the character.

Upvotes: 1

Related Questions