View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_2_] Alan Beban[_2_] is offline
external usenet poster
 
Posts: 783
Default Application.Match

wrote:
Its a simplifed version of your
Application.match(11,ColumnVector(arr,1),0) and
Application.match(11,ColumnVector(arr,1))

What I'm trying to do is something like as follows:

For i = 1 to UBound(a1,1)
lb = Application.match(a1(i,1),ColumnVector(a2,1),0)
ub = Application.match(a1(i,1),ColumnVector(a2,1)
For j = lb to ub

I've already checked and the items are both strings (e.g. both "11" and
"11)
That's why I followed the ColumnVector function step by step to make
sure that both the item to be matched was a string and the column
vector was also only strings.

Try substituting
lb = Application.match(CStr(a1(i,1)),ColumnVector(a2,1) ,0)
ub = Application.match(CStr(a1(i,1)),ColumnVector(a2,1)

Alan Beban