worksheetfunction.match
Hi Yong
It works when I tested it. Try also to define G2:G235 in a Name range by
going into Insert on the Excel menuName Define Trange select
G2:G235 and run the code again.
regards, xlsops
"Li Jianyong" wrote:
Dear Franciz,
thanks for your help. But it still doesn't work. it shows same err.number
1004
Best regards
Li Jianyong
"franciz" wrote:
Try using
Application.WorksheetFunction _
.Match(19031, Worksheets("drawing").Range("Trange"), 0)
If you use a worksheet function that requires a range reference as an
argument, you must specify a Range object.
regards,
"Li Jianyong" wrote:
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
|