Application.Match(ItemNumber, Worksheets("main").Range("d11.d200"), 0))
I have a column of data which has mixed "pure" numbers and numbers with alpha characters attached; something like 1,2a,2b,3,4,5,6,7a,7b,etc.
My search element (ItemNumber) is always string, despite its name. I get "type mismatch" errors trying to do the match. I have tried every trick I know plus a few from web searches to get Excel to convert that column to text. I can convince Excel (that is, the MATCH function works in Excel), but not VBA. So far the only technique which works in VBA is to add an alpha prefix to each element of the column, e.g. i1,i2a,i2b,i3,i4,etc.
That is hardly how I'd like to solve my problem. ANY ideas most welcome.
I have a column of data which has mixed "pure" numbers and numbers with alpha characters attached; something like 1,2a,2b,3,4,5,6,7a,7b,etc.
My search element (ItemNumber) is always string, despite its name. I get "type mismatch" errors trying to do the match. I have tried every trick I know plus a few from web searches to get Excel to convert that column to text. I can convince Excel (that is, the MATCH function works in Excel), but not VBA. So far the only technique which works in VBA is to add an alpha prefix to each element of the column, e.g. i1,i2a,i2b,i3,i4,etc.
That is hardly how I'd like to solve my problem. ANY ideas most welcome.