x=inputbox

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
 
D

Dave Peterson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top