+ Reply to Thread
Results 1 to 3 of 3

Can LooKUP get return value of True or False?

  1. #1
    lvcha.gouqizi
    Guest

    Can LooKUP get return value of True or False?

    Hi there,

    I want to check a value to see if it is in an array. If it is in the
    array then return true, else return false. I use LookUP function but it
    does not work. Here is my table

    A B C D
    1 1 6 1
    2 1 3 1
    3 1 1 1

    I want to check values in column C in Column A. If it is in {1,2,3}
    then return 1 in Column D at the corresponding row. But the cell with 6
    there also return 1. Any way to correct it?
    Thanks.

    lc


  2. #2
    Rowan Drummond
    Guest

    Re: Can LooKUP get return value of True or False?

    In D2 enter:
    =IF(ISNA(VLOOKUP(C2,$A$2:$A$100,1,0)),0,1)
    Then copy down as required.
    This will return 1 if the value is found in column A and 0 if it is not
    found.

    Hope this helps
    Rowan

    lvcha.gouqizi wrote:
    > Hi there,
    >
    > I want to check a value to see if it is in an array. If it is in the
    > array then return true, else return false. I use LookUP function but it
    > does not work. Here is my table
    >
    > A B C D
    > 1 1 6 1
    > 2 1 3 1
    > 3 1 1 1
    >
    > I want to check values in column C in Column A. If it is in {1,2,3}
    > then return 1 in Column D at the corresponding row. But the cell with 6
    > there also return 1. Any way to correct it?
    > Thanks.
    >
    > lc
    >


  3. #3
    Jim Thomlinson
    Guest

    RE: Can LooKUP get return value of True or False?

    This should do...

    In Cell D1 =COUNTIF($A$1:$A$3, C1)>0
    In Cell B1 =COUNTIF($C$1:$C$3,A1)>0
    --
    HTH...

    Jim Thomlinson


    "lvcha.gouqizi" wrote:

    > Hi there,
    >
    > I want to check a value to see if it is in an array. If it is in the
    > array then return true, else return false. I use LookUP function but it
    > does not work. Here is my table
    >
    > A B C D
    > 1 1 6 1
    > 2 1 3 1
    > 3 1 1 1
    >
    > I want to check values in column C in Column A. If it is in {1,2,3}
    > then return 1 in Column D at the corresponding row. But the cell with 6
    > there also return 1. Any way to correct it?
    > Thanks.
    >
    > lc
    >
    >


+ 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