HI All,
I am looking for a macro to assist with a task that needs to loop through the set of rows in a well organised data set (sheet1). from row 2, the code needs to check if there is a "1" in a particular set of columns (K:Z);
If there is a "1", then make a copy of that rows contents from A:J with the header of the column where the "1" is found into the next sheet (A:K ie A:J = contents of that row from Sheet1 and K will inlcude the header of that column of Sheet 1 row 1.
There can be more than one "1" in a row, so it would need to check each cell in the row from column K to Z. when it gets to the next "1" it copy's contents of that row (A:J) into the next row row of Sheet2,
it stops the check at column Z then moves to the next row and then checks from column K again to see if there is a "1".
This is the data set (SHeet 1 ) above while below is what the end result should look like having iterated through row 2 and 3 manually.
File is also attached for full data set here: ---> File
I am looking for a macro to assist with a task that needs to loop through the set of rows in a well organised data set (sheet1). from row 2, the code needs to check if there is a "1" in a particular set of columns (K:Z);
If there is a "1", then make a copy of that rows contents from A:J with the header of the column where the "1" is found into the next sheet (A:K ie A:J = contents of that row from Sheet1 and K will inlcude the header of that column of Sheet 1 row 1.
There can be more than one "1" in a row, so it would need to check each cell in the row from column K to Z. when it gets to the next "1" it copy's contents of that row (A:J) into the next row row of Sheet2,
it stops the check at column Z then moves to the next row and then checks from column K again to see if there is a "1".
This is the data set (SHeet 1 ) above while below is what the end result should look like having iterated through row 2 and 3 manually.
File is also attached for full data set here: ---> File