Hi, i have this code below and every time i make a change to the worksheet, Excel crashes. Whats the problem?
![]()
Private Sub Worksheet_Change(ByVal Target As Range) Lastrow = Worksheets("Edit").Cells(Worksheets("Edit").Rows.Count, "A").End(xlUp).Row SEQ = 1 For I = 2 To Lastrow If Cells(I, 6).Value = "GOOD" Or Cells(I, 6).Value = "BAD" Then Cells(I, 7).Value = SEQ SEQ = SEQ + 1 Else: Cells(I, 7).Value = "" End If Next I End Sub
Bookmarks