Values in a range

  • Thread starter Thread starter mouseman5
  • Start date Start date
M

mouseman5

Is there a straightforward way to check a range for the presence of
specified value that doesn't return N/A if the value isn't present
 
=IF(ISNA(MATCH(A1,B1:B10,0)),"",MATCH(A1,B1:B10,0))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi
one way:
=IF(COUNTIF(A1:A100,3)>0,"3 is in the range","3 is not in the range")
or
=IF(ISNA(MATCH(3,A1:A100,0)),"3 is not in the range","3 is in the
range")
 
Combine an IF function with the Lookup function, where the IF can return a
null ("") if an error is returned.

For example:

=IF(ISNA(MATCH(D1,A1:A10,0)),"",VLOOKUP(D1,A1:B10,2,0))
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================



Is there a straightforward way to check a range for the presence of a
specified value that doesn't return N/A if the value isn't present?
 
=COUNTIF(A1:A100, sought_value)

will return 0 (if not there) or a positive integer.

Alan Beban
 
One more version of the =countif() suggestion:

=countif(b1:x99,"*myvalue*")
or
=countif(b1:x99,"*" & a1 & "*")

it'll look for that value anywhere in the cell.
 
=--ISNUMBER(MATCH(Value,Range,0))

would be a fast way doing it. 1 as result means "present", 0 "not present".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top