Can anyone share a fast way to sort rows (ascending or descending) in each section of a worksheet based on the value of a specified column using VBA?
I have working code but there are many lines and seems very cumbersome. I know there is a quicker way to do it that I am not aware of.
Inserted is a workbook with an example of what I am trying to accomplish. I need to sort the rows in each section by Flight/Truck number or by the ETA/ETD.
Any help would greatly be appreciated!
I have working code but there are many lines and seems very cumbersome. I know there is a quicker way to do it that I am not aware of.
Inserted is a workbook with an example of what I am trying to accomplish. I need to sort the rows in each section by Flight/Truck number or by the ETA/ETD.
Original FlytsTest.xls | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | OUTBOUNDFLIGHTS | |||||||
2 | Flyt# | Code | ETD | ATD | (+/-) | DelayCode | ||
3 | 1603 | SLC | 0755 | 0758 | -3 | |||
4 | 1606 | MIA | 0841 | 0840 | 1 | |||
5 | 1609 | AUS | 1004 | 1004 | 0 | |||
6 | 1610 | MCO | 1005 | 1022 | -17 | xld | ||
7 | 1611 | FAT | 1018 | 1019 | -1 | |||
8 | 1612 | MSY | 1020 | 1005 | 15 | |||
9 | 1625 | PVD | 1032 | 1040 | -8 | mech | ||
10 | ||||||||
11 | INBOUNDFLIGHTS | |||||||
12 | Flyt# | Code | ETA | ATA | (+/-) | DelayCode | ||
13 | 1754 | DAL | 1545 | 1546 | -1 | |||
14 | 1757 | PHX | 1550 | |||||
15 | 1758 | BFI | 1603 | 1624 | -21 | xld | ||
16 | 1769 | DEN | 1557 | |||||
17 | 1776 | SFO | 1620 | |||||
18 | 8281 | EMA | 0930 | 0932 | -2 | |||
19 | ||||||||
20 | OUTBOUNDTRUCKS | |||||||
21 | Trk# | Code | ETD | ATD | (+/-) | DelayCode | ||
22 | 15648 | EBR | 1600 | |||||
23 | 15739 | RDU | 1600 | |||||
24 | 16057 | LIT | 1600 | |||||
25 | 16330 | UUH | 1400 | |||||
26 | 16331 | PPH | 1400 | |||||
27 | 16516 | CLU | 1600 | |||||
28 | 16521 | CMH | 1515 | |||||
29 | ||||||||
30 | ||||||||
Arrival & Departure |
Any help would greatly be appreciated!