View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Finding the Location within an Array

dim res as variant
res = application.match(some_value, myArray,0)
if iserror(res) then
'no match
else
msgbox res
end if



Sh0t2bts wrote:

Hi All,

Thanks to this Group I was provided a snipit of code to find out is a
value is within my Array:-
If Not IsError(Application.Match(some_value, myArray,0)) Then
Do somthing
else
Do somthing else
End If

This works Great Thank You.

Is it possible to find out the location of the value without having to
loop through each entry?

Many Thanks

Mark


--

Dave Peterson