legalhustler
Well-known Member
- Joined
- Jun 5, 2014
- Messages
- 1,214
- Office Version
- 365
- Platform
- Windows
Hello Everyone,
I'm working with a column called "DateCol Transposed," which has nested table values. The table values contains dates which a process failed for each unique ID (see image below). Note the ID column is not shown in the image.
So as an example, if I expand the "DateCol Transposed" column the table will look like below (I disregard the other columns for now):
I need to transform the table above (or the nested table values if I do not expand it) to look like the table below using the following rules:
For non-consecutive/single dates (those with no succeeding date), the correction date is the same as the failed date. For consecutive dates (those with succeeding dates), only the first and last dates should be picked. The duration is the difference between the Correction Date and Failed Date.
I cross posted on another forum but didn't get any replies. You can disregard it because the example had the wrong info.
Any help is appreciated. Thanks!
I'm working with a column called "DateCol Transposed," which has nested table values. The table values contains dates which a process failed for each unique ID (see image below). Note the ID column is not shown in the image.
So as an example, if I expand the "DateCol Transposed" column the table will look like below (I disregard the other columns for now):
ID | Column1 | Column2 | Column3 | Column4 | Column5 | Column6 |
123 | 6/17/2024 | 6/19/2024 | 6/20/2024 | 6/21/2024 | 6/24/2024 | 6/26/2024 |
999 | 6/17/2024 | |||||
888 | 6/18/2024 | 6/19/2024 | ||||
777 | 6/10/2024 | 6/12/2024 | 6/13/2024 |
I need to transform the table above (or the nested table values if I do not expand it) to look like the table below using the following rules:
For non-consecutive/single dates (those with no succeeding date), the correction date is the same as the failed date. For consecutive dates (those with succeeding dates), only the first and last dates should be picked. The duration is the difference between the Correction Date and Failed Date.
ID | Failed Date | Correction Date | Duration (Excluding weekends) |
123 | 6/17/2024 | 6/17/2024 | 1 |
123 | 6/19/2024 | 6/24/2024 | 4 |
123 | 6/26/2024 | 6/26/2024 | 1 |
999 | 6/17/2024 | 6/17/2024 | 1 |
888 | 6/18/2024 | 6/19/2024 | 2 |
777 | 6/10/2024 | 6/10/2024 | 1 |
777 | 6/12/2024 | 6/13/2024 | 2 |
I cross posted on another forum but didn't get any replies. You can disregard it because the example had the wrong info.
Excel Forum
Determine Duration for Consecutive and Non-Consecutive Dates
www.myonlinetraininghub.com
Any help is appreciated. Thanks!