# Wildcard Not Working in IF statement

1. ## Wildcard Not Working in IF statement

I'm having trouble getting the "*" wildcard to work in my IF statement.

Here's a simple example of my formula that resides in {Column B}:

=IF(A2="*McCaleb",TRUE,FALSE)

Here's my array:
{Column A} {Column B}
Justin McCaleb FALSE
Daniel McCaleb FALSE
Tori McCaleb FALSE
Jeff McCaleb FALSE
Renee McCaleb FALSE
Chuck Lodge FALSE
Marlene Lodge FALSE
Mom Durst FALSE
Jim Durst FALSE
Bruce Smith FALSE
Lynda Smith FALSE
Shouldn't this return a "TRUE" in any cell that contains "McCaleb"?

2. ## RE: Wildcard Not Working in IF statement

An alternative:
=IF(ISERROR((SEARCH("McCaleb",A2,1))),FALSE,TRUE)

Or, if having the TRUE and FALSE is confusing:
=IF(NOT((ISERROR((SEARCH("McCaleb",A2,1))))),TRUE,FALSE)

tj

"jrmccaleb@comcast.net" wrote:

> I'm having trouble getting the "*" wildcard to work in my IF statement.
>
>
> Here's a simple example of my formula that resides in {Column B}:
>
> =IF(A2="*McCaleb",TRUE,FALSE)
>
> Here's my array:
> {Column A} {Column B}
> Justin McCaleb FALSE
> Daniel McCaleb FALSE
> Tori McCaleb FALSE
> Jeff McCaleb FALSE
> Renee McCaleb FALSE
> Chuck Lodge FALSE
> Marlene Lodge FALSE
> Mom Durst FALSE
> Jim Durst FALSE
> Bruce Smith FALSE
> Lynda Smith FALSE
> Shouldn't this return a "TRUE" in any cell that contains "McCaleb"?
>
>

3. ## Re: Wildcard Not Working in IF statement

For a "True" or "False", try this:

=ISNUMBER(FIND("McCaleb",A2))
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

<jrmccaleb@comcast.net> wrote in message
I'm having trouble getting the "*" wildcard to work in my IF statement.

Here's a simple example of my formula that resides in {Column B}:

=IF(A2="*McCaleb",TRUE,FALSE)

Here's my array:
{Column A} {Column B}
Justin McCaleb FALSE
Daniel McCaleb FALSE
Tori McCaleb FALSE
Jeff McCaleb FALSE
Renee McCaleb FALSE
Chuck Lodge FALSE
Marlene Lodge FALSE
Mom Durst FALSE
Jim Durst FALSE
Bruce Smith FALSE
Lynda Smith FALSE
Shouldn't this return a "TRUE" in any cell that contains "McCaleb"?

4. ## RE: Wildcard Not Working in IF statement

I forgot a word in my description of the second formula.
This line:
> Or, if having the TRUE and FALSE is confusing

> Or, if having the TRUE and FALSE reversed is confusing:

tj

5. ## RE: Wildcard Not Working in IF statement

Try =IF(ISERROR((FIND("McCaleb",A2,1)))=TRUE,"False","True")

"jrmccaleb@comcast.net" wrote:

> I'm having trouble getting the "*" wildcard to work in my IF statement.
>
>
> Here's a simple example of my formula that resides in {Column B}:
>
> =IF(A2="*McCaleb",TRUE,FALSE)
>
> Here's my array:
> {Column A} {Column B}
> Justin McCaleb FALSE
> Daniel McCaleb FALSE
> Tori McCaleb FALSE
> Jeff McCaleb FALSE
> Renee McCaleb FALSE
> Chuck Lodge FALSE
> Marlene Lodge FALSE
> Mom Durst FALSE
> Jim Durst FALSE
> Bruce Smith FALSE
> Lynda Smith FALSE
> Shouldn't this return a "TRUE" in any cell that contains "McCaleb"?
>
>

6. ## Wildcard Not Working in IF statement

Hi!

Everyone offered good alternatives but nobody mentioned
that an IF() will not accept wildcards.

Biff

>-----Original Message-----
>I'm having trouble getting the "*" wildcard to work in my

IF statement.
>
>
>Here's a simple example of my formula that resides in

{Column B}:
>
>=IF(A2="*McCaleb",TRUE,FALSE)
>
>Here's my array:
>{Column A} {Column B}
>Justin McCaleb FALSE
>Daniel McCaleb FALSE
>Tori McCaleb FALSE
>Jeff McCaleb FALSE
>Renee McCaleb FALSE
>Chuck Lodge FALSE
>Marlene Lodge FALSE
>Mom Durst FALSE
>Jim Durst FALSE
>Bruce Smith FALSE
>Lynda Smith FALSE
>Shouldn't this return a "TRUE" in any cell that

contains "McCaleb"?
>
>.
>

7. ## Re: Wildcard Not Working in IF statement

<jrmccaleb@comcast.net> wrote...
>I'm having trouble getting the "*" wildcard to work in my IF statement.
>
>Here's a simple example of my formula that resides in {Column B}:
>
>=IF(A2="*McCaleb",TRUE,FALSE)

....

Everyone else seems to like long formulas with many function calls. The
minimalist approach would be

=COUNTIF(A2,"*McCaleb")=1

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1