Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
 Dim MyText As String
  MyText = "Offset Debug Text"
If Target.Cells.Count > 1 Then Exit Sub
On Error Resume Next
Select Case UCase(Target.Value)
    Case "END-LOCATION"
        Target.Offset(0, 0).Select 
        Selection.ClearContents 
        Target.Offset(0, -1).Select 
    Case "START-LOCATION"
        Target.Offset(0, 0).Select
        Selection.ClearContents
        Target.Offset(-1, 1).Select
    Case "NEW-BOX"
    Selection.Offset(-1, 2).Select
    Selection.ClearContents
    Selection.Offset(1, -2).Select
    Case "RESTART-BOX"
   'code to go back to last new box
End Select
    
End Sub
Hello all, I have this code, and I want to add in a 'restart-box' case, which when entered, will remove all the rows since the last new box. I imagine I would have to increment a variable every time something other than new box is entered, but I have no idea how to do this via VBA, any help will be greatly appreciated.