If this is the problem line you should split out the Application.Match parts to make things easier to debug.
NextInt = Application.WorksheetFunction.Index(EM.Range("A13:D18"), Application.WorksheetFunction.Match(AvgValue, EM.Range("A13:A18"), 0), Application.WorksheetFunction.Match(Cells(NextRow, 6), EM.Range("A13:D13"), 0)) '<-Error happens in this Row
For example.
Dim ResCol As Variant
Dim ResRow As Variant
' other code
ResCol = Application.Match(Cells(NextRow, 6), EM.Range("A13:D13"), 0)
ResRow = Application.Match(AvgValue, EM.Range("A13:A18"), 0)
If Not IsError(ResCol) And Not IsError(ResRow) Then
NextInt = Application.WorksheetFunction.Index(EM.Range("A13:D18"), ResRow, ResCol)
Else
Msgbox "Problem finding match(es)."
End If
Bookmarks