E
ExcelQuestion123
I'm having an issues with this simple code and can't figure it out. I
always get the type mismatch error. I do have a range named
StatusTable, so that's not the problem. Please help.
Sub msg()
Dim i, j, k As Integer
i = 1
j = 3
If Application.VLookup(Worksheets(i).Range("A" & j) &
Worksheets(i).Range("D" & j), Range("StatusTable"), 2, False) = "Paid"
Then
MsgBox ("Correct")
Else: MsgBox ("Error")
End If
End Sub
always get the type mismatch error. I do have a range named
StatusTable, so that's not the problem. Please help.
Sub msg()
Dim i, j, k As Integer
i = 1
j = 3
If Application.VLookup(Worksheets(i).Range("A" & j) &
Worksheets(i).Range("D" & j), Range("StatusTable"), 2, False) = "Paid"
Then
MsgBox ("Correct")
Else: MsgBox ("Error")
End If
End Sub