Consulting

Results 1 to 5 of 5

Thread: IF and OR .... Can't seem to work it out.

  1. #1

    IF and OR .... Can't seem to work it out.

    I have the following two formulas that work independently.

    =IFERROR(IF(FIND(LEFT(E$1,3),$B2,1)>0,"X",""),"")
    and
    =IFERROR(IF(FIND(LEFT(E$1,3),$C2,1)>0,"X",""),"")
    I need to basically combine these into one formula...
    I've tried the following.


    =IFERROR(IF(OR(FIND(LEFT(D$1,3),$B2,1),FIND(LEFT(D$1,3),$C2,1))>0,"X",""),"")
    This returns no results to my query.

    and I've also tried this. (without OR)

    =IFERROR(IF(FIND(LEFT(D$1,3),$B2,1)>0,"X",IF(FIND(LEFT(D$1,3),$C2,1)>0,"X")),"")
    Now this one, appears to work for the first condition, but doesn't work for the second condition?

    Could someone please advise me what the problem is?
    Thanks
    Attached Files Attached Files

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Try

    =IF(OR(ISNUMBER(FIND(LEFT(D$1,3),$B2,1)),ISNUMBER(FIND(LEFT(D$1,3),$C2,1))) ,"X","")
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Thanks xld
    ISNUMBER!! Works perfectly.

    Rep added.

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Can you see why, or do you want it explained?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,645
    or

    =IF(ISERR(FIND(LEFT(D$,3),B2&C2)),"","X")

Posting Permissions

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