(Solved) – Looking for how to put user input into my code with a loop

  • by
Sub Delete0()
Dim myRow As Variant
myRow = InputBox("What row does the data start in?")

Dim myColumn As Variant
myColumn = InputBox("What Column does the data start in? (number format, i.e A=1, B=2)")

Dim LR As Long
Dim FR As Long

LR = 1 'where to have myRow be entered
FR = Cells(Rows.Count, 1).End(xlUp).Row

Do Until LR > FR
    If Cells(LR, 17).Value > 0 Then 'Where to have myColumn be entered
        LR = LR   1
        Cells(LR, 17).EntireRow.Delete
        FR = FR - 1
    End If
End Sub

This is my current code but I want to add user input on the data may change from week to week starting at a different row and the values being deleted in a different column. How would I enter this into my current code?

Leave a Reply

Your email address will not be published. Required fields are marked *