Getting a the position of a single item in an array
If IsError(Application.Match(jdate, arr, 0)) Then
result = 0
Else
result = Application.Match(jdate, arr, 0)
End If
Alan Beban
pinkfloydfan wrote:
Thanks Toyin
For the moment I have implemented a While...Wend loop and used the
value to get out the final result I need from a second array (Array2):
i = 1
While dateslist(i) < jdate
i = i + 1
Wend
if dateslist(i)<jdate then
result = 0
else
result = Array2(i)
end if
But, if anyone has a quicker way of doing it that would be great
Lloyd
|