Testing a range of cells in an IF FUNCTION

Trying to test a range of cells in an IF Function.  I would like the function to look at 15 cells in a single row, find a value within those cells, and then return another value if TRUE/FALSE.  As of now, I can only apply the "logical test" in the IF formula for ONE CELL ONLY.  I would like it to test a RANGE of cells in one row, find if any of the values match my logical test, and then return a value.  Anyone understand or know how to do this?  I tried apply "lookup" function, but I don't think it will work

Please help

Aaro
aaronplange at hotmail.com
0
anonymous (74722)
4/2/2004 6:11:09 PM
excel.misc 78881 articles. 5 followers. Follow

4 Replies
360 Views

Similar Articles

[PageSpeed] 7

Hi
maybe something like
=IF(COUNTIF(A1:A100,"your value")>1,"found","not found")

or
IF(ISNA(VLOOKUP("your_value",A1:B100,2,0)),"not
found",VLOOKUP("your_value",A1:B100,2,0))


--
Regards
Frank Kabel
Frankfurt, Germany


Aaron wrote:
> Trying to test a range of cells in an IF Function.  I would like the
> function to look at 15 cells in a single row, find a value within
> those cells, and then return another value if TRUE/FALSE.  As of now,
> I can only apply the "logical test" in the IF formula for ONE CELL
> ONLY.  I would like it to test a RANGE of cells in one row, find if
> any of the values match my logical test, and then return a value.
> Anyone understand or know how to do this?  I tried apply "lookup"
> function, but I don't think it will work.
>
> Please help!
>
> Aaron
> aaronplange at hotmail.com

0
frank.kabel (11126)
4/2/2004 6:20:08 PM
Hi Aaron

You can use the COUNTIF function

=IF(COUNTIF(A1:O1,"yourvalue")>0,"yes","No")

-- 
Regards Ron de Bruin
http://www.rondebruin.nl


"Aaron" <anonymous@discussions.microsoft.com> wrote in message news:19846C57-6D1F-46E3-843D-159323B69B6F@microsoft.com...
> Trying to test a range of cells in an IF Function.  I would like the function to look at 15 cells in a single row, find a value
within those cells, and then return another value if TRUE/FALSE.  As of now, I can only apply the "logical test" in the IF formula
for ONE CELL ONLY.  I would like it to test a RANGE of cells in one row, find if any of the values match my logical test, and then
return a value.  Anyone understand or know how to do this?  I tried apply "lookup" function, but I don't think it will work.
>
> Please help!
>
> Aaron
> aaronplange at hotmail.com


0
rondebruin (3790)
4/2/2004 6:23:21 PM
Aaron,

Try something like

=NOT(ISNA(MATCH("user01",A2:H2,0)))

-- 

HTH

Bob Phillips
    ... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Aaron" <anonymous@discussions.microsoft.com> wrote in message
news:19846C57-6D1F-46E3-843D-159323B69B6F@microsoft.com...
> Trying to test a range of cells in an IF Function.  I would like the
function to look at 15 cells in a single row, find a value within those
cells, and then return another value if TRUE/FALSE.  As of now, I can only
apply the "logical test" in the IF formula for ONE CELL ONLY.  I would like
it to test a RANGE of cells in one row, find if any of the values match my
logical test, and then return a value.  Anyone understand or know how to do
this?  I tried apply "lookup" function, but I don't think it will work.
>
> Please help!
>
> Aaron
> aaronplange at hotmail.com


0
bob.phillips1 (6510)
4/2/2004 6:25:51 PM
Testing to see if 2 exists in the range A1:O1:

=IF(SUM(--(A1:O1=2))>0,TRUE,FALSE)

Array-entered, meaning press ctrl/shift/enter.

Although this is simpler:

=IF(COUNTIF(A1:O1,2),TRUE,FALSE)

HTH
Jason
Atlanta, GA

>-----Original Message-----
>Trying to test a range of cells in an IF Function.  I 
would like the function to look at 15 cells in a single 
row, find a value within those cells, and then return 
another value if TRUE/FALSE.  As of now, I can only apply 
the "logical test" in the IF formula for ONE CELL ONLY.  I 
would like it to test a RANGE of cells in one row, find if 
any of the values match my logical test, and then return a 
value.  Anyone understand or know how to do this?  I tried 
apply "lookup" function, but I don't think it will work.
>
>Please help!
>
>Aaron
>aaronplange at hotmail.com
>.
>
0
jason.morin (561)
4/2/2004 6:28:12 PM
Reply:

Similar Artilces: