I have a worksheet named BL_OUT_WORKSHEET. I am attemting to match each value in Column I to the last row to the values in a second worksheet named VT11 in Column A. If a match occurs I want to add the text VT11 to the BL_OUT_WORKSHEET coumn E. I am using an If IsNotErrror - Then Syntax
Here is the code I have currentlyI calculate the last row without error and the Match(Range("I" & r).Value shows a value that equals the value in the first row that I will look to match to. The macro bugs out in the If Not IsError row with a run time code 242. I'm assuming I have a syntax error since it cant find the object. Can you help me correct this or another method![]()
Application.ScreenUpdating = False r = 2 With ThisWorkbook.Sheets("BL_OUT_WORKSHEET") Do Until .Range("A" & r).Value = "" For Each cell In Range("I2:I" & r) If Not IsError(Applcation.Match(Range("I" & r).Value, Sheets("VT11").Columns(1), 0)) Then Worksheets("BL_OUT_WORKSHEET").Range("E" & r).Value = "VT11" End If Next r = r + 1 Loop End With Application.ScreenUpdating = True End Sub
Bookmarks