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"?
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"?
>
>
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
news:1105214487.263829.168850@c13g2000cwb.googlegroups.com...
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"?
I forgot a word in my description of the second formula.
This line:
> Or, if having the TRUE and FALSE is confusing
Should have read:
> Or, if having the TRUE and FALSE reversed is confusing:
tj
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"?
>
>
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"?
>
>.
>
<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)
Bookmarks