Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub CommandButton3_Click()
- Dim iLastRow As Long
- Dim i As Long
- Dim myValue2 As String
- myValue2 = InputBox("Enter Last Name:")
- With ActiveSheet
- iLastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
- For i = 33 To iLastRow
- If ActiveCell.Value = myValue2 Then
- ActiveCell.EntireRow.Clear
- Else
- End If
- Next i
- End With
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement