I have an excel with professional data, I want to Auto sort (descending) based on a column header (Experience), also if on entering new record it should auto sort accordingly, on completing the entries,
Column A to E, is the entry field, and Column H to J are only display columns.
Pl. help is providing the VBA code to this request.
Thank you
KSK
Column A to E, is the entry field, and Column H to J are only display columns.
Pl. help is providing the VBA code to this request.
Thank you
KSK
Auto Sort.xlsx | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | H | I | J | |||||
2 | S.No | Birth Name | Start Date | End Date | Today | Experience | ||||||
3 | 1 | Names 1 | 01-Jan-90 | 2-Mar-04 | 14 | 2 | 1 | |||||
4 | 1 | Names 2 | 01-Jan-75 | 01-Jan-06 | 3-Mar-04 | 31 | 0 | 0 | ||||
5 | 1 | Names 3 | 01-Jan-85 | 4-Mar-04 | 19 | 2 | 3 | |||||
6 | 1 | Names 4 | 01-Jan-89 | 5-Mar-04 | 15 | 2 | 4 | |||||
7 | 1 | Names 5 | 01-Nov-95 | 6-Mar-04 | 8 | 4 | 5 | |||||
8 | 1 | Names 6 | 1-Jan-98 | 7-Mar-04 | 6 | 2 | 6 | |||||
9 | 1 | Names 7 | 01-Jan-96 | 01-Jan-10 | 8-Mar-04 | 14 | 0 | 0 | ||||
10 | 1 | Names 8 | 01-Jan-86 | 01-Jan-94 | 9-Mar-04 | 8 | 0 | 0 | ||||
11 | 1 | Names 9 | 01-Jan-87 | 01-Jan-04 | 10-Mar-04 | 17 | 0 | 0 | ||||
12 | 1 | Names 10 | 01-Jan-98 | 01-Jan-15 | 11-Mar-04 | 17 | 0 | 0 | ||||
13 | 1 | Names 11 | 01-Jan-98 | 01-Jan-08 | 12-Mar-04 | 10 | 0 | 0 | ||||
14 | 1 | Names 12 | 01-Jan-79 | 13-Mar-04 | 25 | 2 | 12 | |||||
15 | 1 | Names 13 | 01-Jan-97 | 01-Jan-99 | 14-Mar-04 | 2 | 0 | 0 | ||||
16 | 1 | Names 14 | 1-Jan-82 | 1-Jan-99 | 15-Mar-04 | 17 | 0 | 0 | ||||
17 | 1 | Names 15 | 1-Jan-95 | 16-Mar-04 | 9 | 2 | 15 | |||||
18 | 1 | Names 16 | 1-Jan-96 | 17-Mar-04 | 8 | 2 | 16 | |||||
19 | 1 | Names 17 | 1-Jan-95 | 18-Mar-04 | 9 | 2 | 17 | |||||
20 | 1 | Names 18 | 1-Jan-97 | 19-Mar-04 | 7 | 2 | 18 | |||||
21 | 1 | Names 19 | 01-Jan-01 | 20-Mar-04 | 3 | 2 | 19 | |||||
22 | 1 | Names 20 | 01-Jan-03 | 21-Mar-04 | 1 | 2 | 20 | |||||
23 | 1 | Names 21 | 01-Jan-04 | 22-Mar-04 | 0 | 2 | 21 | |||||
24 | 1 | Names 22 | 01-Jan-02 | 23-Mar-04 | 2 | 2 | 22 | |||||
25 | 1 | Names 23 | 01-Jan-99 | 24-Mar-04 | 5 | 2 | 23 | |||||
26 | 1 | 25-Mar-04 | 104 | 2 | 25 | |||||||
27 | 1 | 26-Mar-04 | 104 | 2 | 26 | |||||||
28 | 1 | 27-Mar-04 | 104 | 2 | 27 | |||||||
29 | 1 | 28-Mar-04 | 104 | 2 | 28 | |||||||
30 | 1 | 29-Mar-04 | 104 | 2 | 29 | |||||||
31 | 1 | 30-Mar-04 | 104 | 2 | 30 | |||||||
32 | 1 | 31-Mar-04 | 104 | 2 | 31 | |||||||
33 | 1 | 1-Apr-04 | 104 | 3 | 1 | |||||||
34 | 1 | 2-Apr-04 | 104 | 3 | 2 | |||||||
35 | 1 | 3-Apr-04 | 104 | 3 | 3 | |||||||
36 | 1 | 4-Apr-04 | 104 | 3 | 4 | |||||||
37 | 1 | 5-Apr-04 | 104 | 3 | 5 | |||||||
38 | 1 | 6-Apr-04 | 104 | 3 | 6 | |||||||
39 | 1 | 7-Apr-04 | 104 | 3 | 7 | |||||||
40 | 1 | 8-Apr-04 | 104 | 3 | 8 | |||||||
41 | 1 | 9-Apr-04 | 104 | 3 | 9 | |||||||
42 | 1 | 10-Apr-04 | 104 | 3 | 10 | |||||||
43 | 1 | 11-Apr-04 | 104 | 3 | 11 | |||||||
44 | 1 | 12-Apr-04 | 104 | 3 | 12 | |||||||
45 | 1 | 13-Apr-04 | 104 | 3 | 13 | |||||||
46 | 1 | 14-Apr-04 | 104 | 3 | 14 | |||||||
47 | 1 | 15-Apr-04 | 104 | 3 | 15 | |||||||
48 | 1 | 16-Apr-04 | 104 | 3 | 16 | |||||||
49 | 1 | 17-Apr-04 | 104 | 3 | 17 | |||||||
50 | 1 | 18-Apr-04 | 104 | 3 | 18 | |||||||
51 | 1 | 19-Apr-04 | 104 | 3 | 19 | |||||||
Person |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H3:H51 | H3 | =IF(NOT(ISBLANK(D3)),DATEDIF(C3,D3,"y"),DATEDIF(C3,E3,"y")) |
I3:I51 | I3 | =IF(NOT(ISBLANK(D3)),DATEDIF(C3,D3,"ym"),DATEDIF(C3,E3,"ym")) |
J3:J51 | J3 | =IF(NOT(ISBLANK(D3)),DATEDIF(C3,D3,"md"),DATEDIF(C3,E3,"md")) |