Test your original data to see if it actually is a number or numbers
formatted as text. If the numbers are text, then finding Match to a number
will fail. A quick test is to Sum the numbers. If the Sum = 0 then they are
text. A quick fix is to multiply the numbers by 1. Put a 1 in an empty cell
somewhere. Right-click the cell and select Copy. Now select all your numbers
on the sheet and Paste Special/Multiply. Now clear the cell with the 1 in it
and run your Match again.
See if that will help
Mike F
"Li Jianyong" <Li
wrote in message
...
I am trying to use worksheetfunction.match to get the data postion in a
range named sheets("drawing").range("G2:G235")
the code is
Dim R as long
Dim Trange as range
Set Trange=sheets("drawing").range("G2:G235")
R=application.worksheetfunction.match( 19031,Trange,0)
Msgbox R
....
I am sure the no. 19031 mentioned above are in the range. But when I run
this program, it appears err.number 1004. I can not get the R value
please provide help. thanks
Li Jianyong