You've got quite a bit going on there. Maybe trial this to see if i or k value is 0...For k = 1 To NumRows For i = 1 To k - 1
HTH. DaveMsgbox ArgString & " I " & I & " K " & k If InStr(1, PredecessorList.Offset(i, 0), activitylist.Offset(k, 0)) > 0 Then