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 () so any help would be greatly appreciated.
A sample workbook would prevent a lot of incorrect guesswork from us.
In the attached, 2 sheets, one with a table (a proper Excel Table (listobject)) and one without. Buttons calling a variation of the same macro.
p45cal Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.