Hello all,
I had a macro previously solved here by protonleah (thanks protonleah)
Here's the link...
http://www.excelforum.com/excel-prog...-criteria.html
Here's the code:
Option Explicit
Sub test()
Application.ScreenUpdating = False
Dim TestDate As Date, _
DateRange As Range, _
DateCol As Long, _
LastRow As Long, _
ctrl As Long, _
FirstRow As Long
'find the column with "date opened"
For ctrl = 1 To 256
If Cells(1, ctrl).Value = "date opened" Then
DateCol = ctrl
Exit For
End If
Next ctrl
FirstRow = 2 '<============== change to suit
LastRow = Cells(Rows.Count, DateCol).End(xlUp).Row
TestDate = InputBox("enter the earliest date to use: mm/dd/yyyy")
Range(Cells(FirstRow, DateCol), Cells(LastRow, DateCol)).Select
Selection.Sort _
Key1:=Cells(FirstRow, DateCol), _
Order1:=xlAscending, _
Header:=xlGuess, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom
Cells(FirstRow, DateCol).Select
For ctrl = LastRow To FirstRow Step -1
If Cells(ctrl, DateCol).Value < TestDate Then
Cells(ctrl, DateCol).EntireRow.Delete
End If
Next ctrl
Application.ScreenUpdating = True
End Sub
I however, would like to modify this code to instead, bring up a list of states that can be selected via checkmark inside a checkbox.
Keep in mind that my data will not actually be states, this is dummy text and data pulled would be from the column named "Date Opened".
Pressing "Cancel", "OK" or "Select All" would automatically keep all "states"
I've attached a sample picture of what I am looking for.
Is this possible?
thanks much
Bookmarks