EssoExplJoe
New Member
- Joined
- Nov 11, 2016
- Messages
- 28
I am trying to use the Match funcition in VBA but always get an error: Below is my code
The Match always returns an error if or not if the value "34567923" is in the range. I have tried just using "ctable" without the .address but it doesn't work either.
What is the proper syntax for using a named range in the match function
VBA Code:
dim ctable as range, wstab as worksheet
Set wstab = Worksheets("CUSPIDTable")
Set ctable = Range(wstab.Cells(4, 6), wstab.Cells(100, 6))
row = Application.Match("34567923", ctable.Address, 0)
The Match always returns an error if or not if the value "34567923" is in the range. I have tried just using "ctable" without the .address but it doesn't work either.
What is the proper syntax for using a named range in the match function