My VBA macro runs reports from Excel to generate a Word doc with upcoming deadlines/due dates. However, I can't figure out how to get the report to automatically sort the deadlines in chronological order when I run macros. Currently, the report generates deadlines like this:
Here are the columns that I am most concerned about:
COLUMN J = CLT CONTACT DUE
COLUMN M = TASK DUE
COLUMN N = TASK DUE DESCRIPTION
I'd like the report to prioritize sorting COLUMN M (Task Due Date) with COLUMN N (Task Due Description), then sort COLUMN J (CLT CONTACT DUE). Ideally, I would love to keep both of the due dates (task due and clt contact due) and task description together in a single line, like this:
However, if it makes more sense to make separate sections by splitting up Column J from Columns M,N, then that's okay too.
Please help!
JONES, LESLIE (CASE DATE 12-8-2021) - SOL EXP. DATE - 12/8/2023 - CLT CONTACT DUE - 11/1/2023 - TASK DUE - 11/21/2023 - TASK DUE DESCRIPTION – COLLECT ADD’L ONBOARDING DOCUMENTS FROM THE CLIENT
DOE, JOHN (CASE DATE) 12-9-2021 - SOL EXP. DATE - 12/9/2023 - CLT CONTACT DUE - 11/21/2023 - TASK DUE - 11/11/2023 - TASK DUE DESCRIPTION – FILL OUT PAPERWORK TO SEND TO THE CLIENT THAT’S DUE IN JANUARY 2024
Here are the columns that I am most concerned about:
COLUMN J = CLT CONTACT DUE
COLUMN M = TASK DUE
COLUMN N = TASK DUE DESCRIPTION
I'd like the report to prioritize sorting COLUMN M (Task Due Date) with COLUMN N (Task Due Description), then sort COLUMN J (CLT CONTACT DUE). Ideally, I would love to keep both of the due dates (task due and clt contact due) and task description together in a single line, like this:
JONES, LESLIE (CASE DATE 12-8-2021) - SOL EXP. DATE - 12/8/2023 – TASK DUE - 11/21/2023 - TASK DUE DESCRIPTION – COLLECT ADD’L ONBOARDNING DOCUMENTS FROM THE CLIENT - CLT CONTACT DUE - 11/1/2023
DOE, JOHN (CASE DATE) 12-9-2021 - SOL EXP. DATE - 12/9/2023 – TASK DUE - 11/11/2023 - TASK DUE DESCRIPTION – FILL OUT PAPERWORK TO SEND TO THE CLIENT THAT’S DUE IN JANUARY 2024 - CLT CONTACT DUE - 11/21/2023
However, if it makes more sense to make separate sections by splitting up Column J from Columns M,N, then that's okay too.
Please help!
CASE DEADLINES EXCEL.xlsm | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | |||
1 | MATTER NAME | INCIDENT DATE | +/- YRS | SOL EXP. DATE | DISPOSED DATE | NEW SOL EXP. DATE | SUB-STATUS | LAST CONTACT DATE | +/- DAYS | CLT CONTACT DUE | TASK DATE | +/- DAYS | TASK DUE | TASK DUE DESCRIPTION | ||
2 | JONES, LESLIE (CASE DATE 12-8-2021) | 12/8/2021 | 2 | 12/8/2023 | 10/27/2021 | 10/27/2023 | INTAKE | 10/2/2023 | 30 | 11/1/2023 | 10/25/2023 | 27 | 11/21/2023 | COLLECT ADD’L ONBOARDING DOCUMENTS FROM THE CLIENT | ||
3 | DOE, JOHN (CASE DATE) 12-9-2021 | 12/9/2021 | 2 | 12/9/2023 | N/A | N/A | INTAKE | 10/22/2023 | 30 | 11/21/2023 | 10/15/2023 | 27 | 11/11/2023 | FILL OUT PAPERWORK TO SEND TO THE CLIENT THAT’S DUE IN JANUARY 2024 | ||
4 | SMITH, CHRIS 05-15-2021 | 05/15/2021 | 2 | 5/15/2023 | 3/30/2022 | 3/30/2024 | CLOSE FILE | 9/27/2023 | 30 | 10/27/2023 | 8/24/2023 | 30 | 9/23/2023 | CALL CLIENT TO CLOSE FILE | ||
Sheet 1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
F2,F4 | F2 | =DATE(YEAR(E2)+C2,MONTH(E2),DAY(E2)) |
D2:D4 | D2 | =DATE(YEAR(B2)+C2,MONTH(B2),DAY(B2)) |
J2:J4,M2:M4 | J2 | =H2+I2 |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
M:M | Cell Value | <TODAY() | text | NO |
M:M | Cell Value | =TODAY() | text | NO |
M:M | Cell Value | between TODAY() and TODAY()+5 | text | NO |
M:M | Cell Value | >TODAY() | text | NO |
D:D | Cell Value | <TODAY() | text | NO |
J:J | Cell Value | <TODAY() | text | NO |
J:J | Cell Value | =TODAY() | text | NO |
D:D | Cell Value | =TODAY() | text | NO |
D:D | Cell Value | between TODAY() and TODAY()+30 | text | NO |
J:J | Cell Value | between TODAY() and TODAY()+30 | text | NO |
D:D | Cell Value | between TODAY() and TODAY()+90 | text | NO |
D:D | Cell Value | between TODAY() and TODAY()+180 | text | NO |
D:D | Cell Value | >TODAY() | text | NO |
J:J | Cell Value | between TODAY() and TODAY()+90 | text | NO |
J:J | Cell Value | between TODAY() and TODAY()+180 | text | NO |
J:J | Cell Value | >=TODAY()+1 | text | NO |
Last edited by a moderator: