Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Mar 2003
    Location
    Toronto, Canada
    Posts
    101
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Wilcards in IF statements (XP)

    Hi,

    Assume the following list of objects and prices:
    A B
    Red Car 5
    Blue Car 5
    Red Boat 5

    If I create the following IF statement in cell C1: =IF(A1="Red*","Yes","No") I get a "No" response.
    However, if I create a SUMIF statement: =SUMIF(A1:A3,"Red*",B1:B3) I get 10.

    So, how come I can use the *(wildcard) character in the SUMIF, but it doesn't work in a regular IF statement???

    Thanks!

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Posts
    3,788
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Wilcards in IF statements (XP)

    Hi

    A couple of work-arounds

    =IF(LEFT(A1,3)="Red","Yes","No")
    =IF(AND(A1>="Red",A1<"Ree"),"Yes","No")

    Personally I would use the first.

Posting Permissions

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