# Excel help - match with wildcard

**URL:** <https://boards.straightdope.com/t/excel-help-match-with-wildcard/755814>\
**Category:** Factual Questions\
**Created:** [May 27, 2016, 3:05pm UTC](https://boards.straightdope.com/t/excel-help-match-with-wildcard/755814 "2016-05-27T15:05:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skammer](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/skammer/32/143_2.png) [@Skammer](https://boards.straightdope.com/u/Skammer)\
**Post date:** [May 27, 2016, 3:05pm UTC](https://boards.straightdope.com/t/excel-help-match-with-wildcard/755814/1 "2016-05-27T15:05:46Z")

</div>

I consider myself a pretty advanced Excel user but I’m having a probably and I haven’t been able to find a solution through Googling the usual sites.

I have a INDEX-MATCH formula. The MATCH piece is looking at the value of one cell ($AD3) and looking for a match in a range on another open workbook. It’s a long array formula but here is the relevant part:

```auto

MATCH(AD3,INDIRECT("'[PA Audit v2.xlsm]" & AF3 & "'!$X$1:$X$5000"),0)

```

The values in the target range are M,N,O,Y. The lookup value in AD3 might be Y, N, or \* (wildcard). If the value is Y or N, this is working fine - but if the value in AD is an asterisk, I’m getting a “value not found” error. Any ideas why it’s not working as a wildcard?

---

<div class="post-metadata">

**Author:** ![Skammer](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/skammer/32/143_2.png) [@Skammer](https://boards.straightdope.com/u/Skammer)\
**Post date:** [May 27, 2016, 3:12pm UTC](https://boards.straightdope.com/t/excel-help-match-with-wildcard/755814/2 "2016-05-27T15:12:29Z")

</div>

Missed the edit window - but I’m having a _problem_, not a “probably.”

---

<div class="post-metadata">

**Author:** ![TroutMan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/troutman/32/6721_2.png) [@TroutMan](https://boards.straightdope.com/u/TroutMan)\
**Post date:** [May 27, 2016, 5:13pm UTC](https://boards.straightdope.com/t/excel-help-match-with-wildcard/755814/3 "2016-05-27T17:13:27Z")

</div>

No idea. I tried it and it returned 1 when I had \* in the cell. Your issue must be something else in the formula.

---

<div class="post-metadata">

**Author:** ![Skammer](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/skammer/32/143_2.png) [@Skammer](https://boards.straightdope.com/u/Skammer)\
**Post date:** [May 27, 2016, 7:54pm UTC](https://boards.straightdope.com/t/excel-help-match-with-wildcard/755814/4 "2016-05-27T19:54:25Z")

</div>

Huh. Strange it works with other values, but gives an error using the wildcard.

Anyway, I ended up short-circuiting the match if the lookup value is “_". Just added an "If(AD3 = "_”, _true condition_, MATCH(…)). I could do that since by definition, the wildcard matches everything anyway.
