Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. Private Sub CommandButton3_Click()
  2. Dim iLastRow As Long
  3. Dim i As Long
  4. Dim myValue2 As String
  5. myValue2 = InputBox("Enter Last Name:")
  6.  
  7. With ActiveSheet
  8.  
  9. iLastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
  10. For i = 33 To iLastRow
  11. If ActiveCell.Value = myValue2 Then
  12. ActiveCell.EntireRow.Clear
  13.  
  14. Else
  15.  
  16. End If
  17. Next i
  18.  
  19. End With
  20.  
  21. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement