Macro for sorting by lot number, splitting table w/new header, then sort by due date
Our database yields us a large Excel table with two important pieces of information: Affected Lot and due date. I need a macro that can first sort by lot number, then split the table into numerous tables, one for each similar lot number, with a new header applied. See below for example:
From this:
Due Date |
Deviation Number |
Affected Lot |
14-Nov-2019 |
1 |
A |
23-Nov-2019 |
2 |
C |
01-Dec-2019 |
3 |
B |
14-Nov-2019 |
4 |
A |
15-Dec-2019 |
5 |
D |
To this:
Due Date |
Deviation Number |
Affected Lot |
14-Nov-2019 |
1 |
A |
14-Nov-2019 |
4 |
A |
Due Date |
Deviation Number |
Affected Lot |
23-Nov-2019 |
2 |
C |
Due Date |
Deviation Number |
Affected Lot |
01-Dec-2019 |
3 |
B |
Due Date |
Deviation Number |
Affected Lot |
15-Dec-2019 |
5 |
D |
My attempt at word VBA has shown me I don't know enough to know how little I truly know (:banghead:) so any help would be greatly appreciated.
Thank you