Also please refer the attached file for the whole input & output sample. Test1.xlsx (11.8 KB)
The output dt is based on how many time the input dt has a particular retail repeated consecutively. For P1, the first 3 rows are blank so skip as we dont need those. Now retail is present in 5th row and is same till row 7 so one datarow should be added to the output dt with the start date from row 5 and end date from row 7.
Hi Yoichi,
The last row if it has a retail with Start Date 12/26/2023 & End date 1/1/2024 gets truncated in the output. Not sure why. All other logic seems fine and working.