+ Reply to Thread
Results 1 to 4 of 4

IF Statement Problem

  1. #1
    Guest

    IF Statement Problem

    I have two columns I want to concentrate on. Column A is
    the result of a folmula in the shape of a vlookup.

    If the value in A is #N/A I want to take this into
    consideration. This is the first thing I dont know how
    to do. I also need to take into consideration another
    column to get the result I need.

    Something like this

    =IF(B1="#N/A" AND D2 contains "stw" OR "iwo" THEN "1","0")

    I know that is wrong but I know it is possible,

    Can someone tell me how to do this. It will be a great
    help. Where I have put my "stw" OR "iwo", this 3 letter
    seq

  2. #2
    Jim Thomlinson
    Guest

    RE: IF Statement Problem

    there is a function ISNA

    so =if(isna(vlookup(,,,)), "Not Found", vlookup(,,,))

    HTH

    "[email protected]" wrote:

    > I have two columns I want to concentrate on. Column A is
    > the result of a folmula in the shape of a vlookup.
    >
    > If the value in A is #N/A I want to take this into
    > consideration. This is the first thing I dont know how
    > to do. I also need to take into consideration another
    > column to get the result I need.
    >
    > Something like this
    >
    > =IF(B1="#N/A" AND D2 contains "stw" OR "iwo" THEN "1","0")
    >
    > I know that is wrong but I know it is possible,
    >
    > Can someone tell me how to do this. It will be a great
    > help. Where I have put my "stw" OR "iwo", this 3 letter
    > seq
    >


  3. #3
    JE McGimpsey
    Guest

    Re: IF Statement Problem

    One way:

    =IF(AND(ISNA(B1),OR(D2="stw",D2="iwo")),1,0)

    or, more compactly (since XL converts TRUE to 1 and FALSE to 0 in math
    operations:

    =ISNA(B1)*((D2="stw")+(D2="iwo"))

    This assumes that you want 1 or 0, not the strings "1" or "0".


    In article <[email protected]>,
    <[email protected]> wrote:

    > I have two columns I want to concentrate on. Column A is
    > the result of a folmula in the shape of a vlookup.
    >
    > If the value in A is #N/A I want to take this into
    > consideration. This is the first thing I dont know how
    > to do. I also need to take into consideration another
    > column to get the result I need.
    >
    > Something like this
    >
    > =IF(B1="#N/A" AND D2 contains "stw" OR "iwo" THEN "1","0")
    >
    > I know that is wrong but I know it is possible,
    >
    > Can someone tell me how to do this. It will be a great
    > help. Where I have put my "stw" OR "iwo", this 3 letter
    > seq


  4. #4
    Jim Thomlinson
    Guest

    RE: IF Statement Problem

    Once you get the isna down pat then you can add the ands and ors

    =if(and(isna(vlookup(,,,)), or(find("stw", D2)>0, find("iwo", D2)>0)), 1, 0)

    Without knowing a few more specifics in terms of cell references this is as
    far as I can help you...

    HTH

    "[email protected]" wrote:

    > I have two columns I want to concentrate on. Column A is
    > the result of a folmula in the shape of a vlookup.
    >
    > If the value in A is #N/A I want to take this into
    > consideration. This is the first thing I dont know how
    > to do. I also need to take into consideration another
    > column to get the result I need.
    >
    > Something like this
    >
    > =IF(B1="#N/A" AND D2 contains "stw" OR "iwo" THEN "1","0")
    >
    > I know that is wrong but I know it is possible,
    >
    > Can someone tell me how to do this. It will be a great
    > help. Where I have put my "stw" OR "iwo", this 3 letter
    > seq
    >


+ 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