Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I would like to look-up a cell's value in a range of cells and return 1 if it
exists or zero if it does not exist in the specified range. I have got to believe this is a fairly common need. Can anyone help me out with this. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() COUNTIF function does this for you. =IF(COUNTIF(range,valuetolookup)0,1,0) -- Wigi http://www.wimgielis.be = Excel/VBA, soccer and music "Michael" wrote: I would like to look-up a cell's value in a range of cells and return 1 if it exists or zero if it does not exist in the specified range. I have got to believe this is a fairly common need. Can anyone help me out with this. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Since the desired results are 1 if true and 0 if false, you can eliminate
the IF function call... =COUNTIF(range,valuetolookup)0 Rick "Wigi" wrote in message ... COUNTIF function does this for you. =IF(COUNTIF(range,valuetolookup)0,1,0) -- Wigi http://www.wimgielis.be = Excel/VBA, soccer and music "Michael" wrote: I would like to look-up a cell's value in a range of cells and return 1 if it exists or zero if it does not exist in the specified range. I have got to believe this is a fairly common need. Can anyone help me out with this. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Well Rick
I could have left out the IF, but you need that one to return 1 and 0, not TRUE and FALSE. That's how I read the question. Another way to get 1 and 0 is: =--(COUNTIF(range,valuetolookup)0) -- Wigi http://www.wimgielis.be = Excel/VBA, soccer and music "Rick Rothstein (MVP - VB)" wrote: Since the desired results are 1 if true and 0 if false, you can eliminate the IF function call... =COUNTIF(range,valuetolookup)0 Rick "Wigi" wrote in message ... COUNTIF function does this for you. =IF(COUNTIF(range,valuetolookup)0,1,0) -- Wigi http://www.wimgielis.be = Excel/VBA, soccer and music "Michael" wrote: I would like to look-up a cell's value in a range of cells and return 1 if it exists or zero if it does not exist in the specified range. I have got to believe this is a fairly common need. Can anyone help me out with this. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Damn! I can't believe I left out the double unary... AGAIN... I seem to have
this mental block about typing them for some reason. Thanks for noting that. Rick "Wigi" wrote in message ... Well Rick I could have left out the IF, but you need that one to return 1 and 0, not TRUE and FALSE. That's how I read the question. Another way to get 1 and 0 is: =--(COUNTIF(range,valuetolookup)0) -- Wigi http://www.wimgielis.be = Excel/VBA, soccer and music "Rick Rothstein (MVP - VB)" wrote: Since the desired results are 1 if true and 0 if false, you can eliminate the IF function call... =COUNTIF(range,valuetolookup)0 Rick "Wigi" wrote in message ... COUNTIF function does this for you. =IF(COUNTIF(range,valuetolookup)0,1,0) -- Wigi http://www.wimgielis.be = Excel/VBA, soccer and music "Michael" wrote: I would like to look-up a cell's value in a range of cells and return 1 if it exists or zero if it does not exist in the specified range. I have got to believe this is a fairly common need. Can anyone help me out with this. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I find the next blank cell in a range? | Excel Worksheet Functions | |||
Find Cell in Named Range | Excel Worksheet Functions | |||
Find if any cell in range is above Zero | Excel Discussion (Misc queries) | |||
find the cell above any number in any range | Excel Worksheet Functions | |||
find a cells from a range of cell | Excel Worksheet Functions |