One way working with numerical values
=MATCH(5,LARGE((A1,C1,E1),ROW(INDIRECT("1:"&COUNT(A1,C1,E1)))),0)
will lookup 5 in A1, C1 and E1 and if C1 holds 5 it will return 2
Which gives the position of 5 in the *sorted* list of values. Depending on what
the OP wants to do with this, this either provides no information (the position
in the original, possibly unordered list is needed, not the position in a sorted
list), or does too much to give the information needed (the OP only wants to
check that there's an instance of 5 in an arbitrary range). In the latter case,
if the arbitrary range is assumed to contain only numbers, that could be done
using
=INDEX(FREQUENCY(ArbitraryRange,C1+TINY*{-1;0;1}),2)>0
where TINY is a defined name referring to a 'small' positive number like 1E-12.
Finding the position of a value in an arbitrary range could be done using
hardcoded OFFSET calls that reproduce the arbitrary range's values as an array,
e.g.,
=MATCH(5,N(OFFSET(A1,0,{0,2,4})),0)
Digression:
-----------
FWLIW, while testing this, I came across unexpected behavior from
CELL("Address",.) when it's fed multiple area range. For example,
=CELL("Address",(A1:A3,A5:A7,A9:A11))
returns
$A$1,$A$5:$A$7,$A$9:$A$11
so it returns the top-left cell from the first area, but it returns the full
range addresses for all other areas. Further, multiple area ranges apparently
ignore parentheses (at least in XL8 - anyone want to test in later versions),
i.e.,
=CELL("Address",(IV65536,(A1:A3,A5:A7,A9:A11)))
returns
$IV$65536,$A$1:$A$3,$A$5:$A$7,$A$9:$A$11
So given an arbitrary range reference ArbitraryRange, Excel can return a
complete textref using the formula
=MID(CELL("Address",(IV65536,ArbitraryRange)),11,1024)
With defined name Seq referring to =ROW(INDIRECT("1:1024")), an array of
textrefs for each area in ArbitraryRange is given by
=MID(CELL("Address",(IV65536,ArbitraryRange)),
SMALL(IF(MID(","&CELL("Address",(IV65536,ArbitraryRange)),Seq,1)=",",Seq),
ROW(INDIRECT("2:"&AREAS(ArbitraryRange)))),
SMALL(IF(MID(CELL("Address",(IV65536,ArbitraryRange))&",",Seq,1)=",",Seq),
ROW(INDIRECT("2:"&AREAS(ArbitraryRange))))
-SMALL(IF(MID(","&CELL("Address",(IV65536,ArbitraryRange)),Seq,1)=",",Seq),
ROW(INDIRECT("2:"&AREAS(ArbitraryRange)))))
Since this eats 6 levels of nested function calls, I couldn't make use of it for
this, but it seems interesting.