Ombir
Active Member
- Joined
- Oct 1, 2015
- Messages
- 433
Hi friends,
I have below data which is need to sort on based of Question Serial No in Row 1.
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Each record consists of 3 rows. Master Question Number, Result and Score. I want to sort Master Question Number row for each Rollno on same order as Top row Column C:Q. Remaining 2 rows for each rollno have to be shifted as per Master Question Number row.
Can anybody provide some VBA code to sort this. Thank you.
I have below data which is need to sort on based of Question Serial No in Row 1.
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Roll | Question Serial No | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
2 | 1001 | Master's Question Number | 8 | 1 | 5 | 3 | 6 | 4 | 7 | 9 | 11 | 10 | 14 | 15 | 13 | 12 | 2 |
3 | Result | C | W | W | W | W | C | W | W | W | W | W | W | W | W | W | |
4 | Score | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
5 | 1002 | Master's Question Number | 14 | 12 | 13 | 1 | 2 | 5 | 4 | 15 | 7 | 11 | 9 | 3 | 8 | 6 | 10 |
6 | Result | C | W | W | C | W | W | C | W | W | W | W | W | W | C | W | |
7 | Score | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | |
8 | 1003 | Master's Question Number | 1 | 4 | 2 | 5 | 15 | 6 | 7 | 13 | 10 | 11 | 14 | 3 | 8 | 9 | 12 |
9 | Result | W | W | W | W | W | C | W | W | W | W | W | W | W | W | W | |
10 | Score | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1
Each record consists of 3 rows. Master Question Number, Result and Score. I want to sort Master Question Number row for each Rollno on same order as Top row Column C:Q. Remaining 2 rows for each rollno have to be shifted as per Master Question Number row.
Can anybody provide some VBA code to sort this. Thank you.