ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Application.Match (https://www.excelbanter.com/excel-programming/308711-re-application-match.html)

[email protected]

Application.Match
 
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.


Alan Beban[_2_]

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


All times are GMT +1. The time now is 02:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com