Split data from multiple column in Dynamic way

I want to split the excel data from multiple column in dynamic way
There are mention excel file and also i’ll give you input file(Sheet1) and expected Output(Sheet2) for your understanding so please check the excel file
data (1).xlsx (8.6 KB)
Please share code with me

Thank you

[What you are doing is grouping, not splitting.

Hi @UJJVAL_BHAGAT

Please check the below attached code and let me know if any changes need to be done.
Sequence40.xaml (36.1 KB)

Regards