x=inputbox

  • Thread starter Thread starter J.W. Aldridge
  • Start date Start date
J

J.W. Aldridge

trying to implement a input box to allow the user to determine the
filter criteria.
Any suggestions?
Thanx

Sub DeleteRows()


Dim LastRow As Long
Dim rw As Long
Application.ScreenUpdating = False
LastRow = Cells(Rows.Count, "c").End(xlUp).Row
For rw = LastRow To 2 Step -1


x = InputBox("Type three letter dept code please", "Department
Filter")


If Cells(rw, "c").Value <> x Then
Rows(rw).Delete Shift:=xlUp
End If
Next rw
Application.ScreenUpdating = True
End Sub
 
Check your other thread.

trying to implement a input box to allow the user to determine the
filter criteria.
Any suggestions?
Thanx

Sub DeleteRows()


Dim LastRow As Long
Dim rw As Long
Application.ScreenUpdating = False
LastRow = Cells(Rows.Count, "c").End(xlUp).Row
For rw = LastRow To 2 Step -1


x = InputBox("Type three letter dept code please", "Department
Filter")


If Cells(rw, "c").Value<> x Then
Rows(rw).Delete Shift:=xlUp
End If
Next rw
Application.ScreenUpdating = True
End Sub
 
Back
Top