Hi fellow VBA lovers,
I would love a solution to help me do the follow:
'Sort' (i.e. push all applicable rows of data which match my criteria to the top of a list, as opposed to just filtering out the irrelevant dates) a list of scheduled courses to the top of my data set based on a date range ('start' and 'end' dates) in Excel 2010. The dates will be provided by the user via an 'Input box' which will pop up at the start when the code is run.
It would be great if the sorted data could be copied and pasted into a new worksheet called 'sorted data'. Tall order but I would be massively grateful of a solution. Cheers
Sample In-Put box:
[TABLE="class: grid, width: 191"]
[TD="colspan: 2"]Please enter the data range your wish to sort by?:
[/TD]
Date range 'Start'
Date range 'End'
10/08/2014 09:00
14/08/2014 09:30
[/TABLE]
- My data starts in Cell A5
- The table headers are in row 4
- My data table has 32 colums
- and 'X' number of rows (usually about 3,000)
An example of my data is below 'dates' to sort by will be present in column B.
[TABLE="class: grid, width: 719, align: left"]
UID ID
Start Date
Last Date
Course UID
Course Title
Status
100909
10/08/2014 09:00
19/08/2014 17:00
JPCVBA
VBA for complete novice
Cancelled
100908
12/08/2014 09:30
11/08/2014 12:30
JPCMIR
Baking in the Microwave
Active
100907
14/08/2014 09:30
12/08/2014 17:30
JPCPLU
Plumbing 101
Cancelled
100906
02/08/2014 09:30
14/08/2014 17:30
JPCDIY
DIY for the accident prone
Active
100905
25/08/2014 09:30
14/08/2014 17:30
JPCCHA
How to dance the cha-cha-cha
Cancelled
100902
18/08/2014 09:30
14/08/2014 17:30
JPCDIY
DIY for the accident prone
Active
[/TABLE]