+ Reply to Thread
Results 1 to 7 of 7

Wildcard Not Working in IF statement

  1. #1
    jrmccaleb@comcast.net
    Guest

    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. #2
    tjtjjtjt
    Guest

    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. #3
    RagDyeR
    Guest

    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
    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"?



  4. #4
    tjtjjtjt
    Guest

    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

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


    tj

  5. #5
    Gary Rowe
    Guest

    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. #6
    Biff
    Guest

    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. #7
    Harlan Grove
    Guest

    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



+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

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