Good Morning Everyone,
I'm trying to use "match" to find a row value. I've been fighting with this for about 45 minutes and don't seem to be getting anywhere. Here is the code:
ActiveWorkbook.Worksheets(1).Select
Dim a As String, B As Range
a = "MvT"
Set B = Worksheets(1).Range(Cells(1, 3), Cells(40, 3))
Dim i As Integer
i = (Application.Match(a, B, 0)) + 2
The line in bold is where the code breaks and the error is thrown. It is Error 13: Type mistmatch. I'm sure it is simple, but I guess I can't see the forest through for the trees.
Thanks in advance.
I'm trying to use "match" to find a row value. I've been fighting with this for about 45 minutes and don't seem to be getting anywhere. Here is the code:
ActiveWorkbook.Worksheets(1).Select
Dim a As String, B As Range
a = "MvT"
Set B = Worksheets(1).Range(Cells(1, 3), Cells(40, 3))
Dim i As Integer
i = (Application.Match(a, B, 0)) + 2
The line in bold is where the code breaks and the error is thrown. It is Error 13: Type mistmatch. I'm sure it is simple, but I guess I can't see the forest through for the trees.
Thanks in advance.