Forum Discussion
presdetois
Jun 28, 2023Copper Contributor
Spliting rows based on criterias
I am stuk and any help would be appreciated. Thank you so much in advance. In an Excel file, there are two sheets. The first sheet consists of a row containing numbers ranging from 1 to 16. The s...
peiyezhu
Jul 03, 2023Bronze Contributor
The "First Sheet" initially contains one row with numbers ranging from 1 to 16. The "Second Sheet" has multiple rows with varying numbers,
can you share a excel file with these 2 sheets?
can you share a excel file with these 2 sheets?
presdetois
Jul 03, 2023Copper Contributor
Yes and I just shared an excel file. any help would be appreciated.
- peiyezhuJul 03, 2023Bronze Contributor1,can you give me some information of the environment why we need to do this kind of transfer?
2,second sheet total have 2+2+3+2=9 cells.
According to If a row in the second sheet has 2 numbers, the corresponding row in the first sheet will be split into 2 rows.
result sheet shuld have 9 rows rather than 6 in result desired you have shared.
1 2
2 6
1 4 12
2 10
3,I guess
3 4 5 6 7 8 9 10 11 12
3 4 5 6 7 8 9 10 11 12
are split from
1 2
why not include
13 14 15 16
I think the desired
result should include all from 1 row of the second sheet exclude 1 2 so than should be
3 4 5 6 7 8 9 10 11 12 13 14 15 16
3 4 5 6 7 8 9 10 11 12 13 14 15 16
instead
?- presdetoisJul 03, 2023Copper Contributorto make simple let's just imagine I only have one row in the second sheet. with numbers 1 and 2 and the first sheet has a row containing 16 numbers like this:
first sheet: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
second sheet 1 2
result desired:
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1 3 4 5 6 7 8 9 10 11 12 13 14 15 16
As you can see the numbers 1 and 2 are not excluded but rather used as criteria to split the row in the first sheet it's like saying if the row in the first sheet has the numbers 1 and 2 together then split that row to contain only one of those numbers (1 and 2) and delete the original row which has 16 numbers and now we are left only with two row containing 15 numbers each instead.- peiyezhuJul 04, 2023Bronze Contributorre:first sheet: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
second sheet 1 2
result desired:
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
In attached row 6 in result desired only row below without 10
2 3 4 5 7 8 9 11 12 13 14 15 16
rather.than
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
you gave just now with 10.
I guess they are conflict.