Hi,
I am trying to write a macro to assign a set new of serial number to each row. For example, each row will be given a number (in sequence) after every 8 rows and when there are no other numbers below it, the code will go back up again to continue the pattern again. Any help on this will be very much appreciated. Thank you!
[TABLE="width: 287"]
<colgroup><col style="margin-left: 40px;"><col style="margin-left: 40px;"></colgroup><tbody>[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[/TR]
</tbody>[/TABLE]
I am trying to write a macro to assign a set new of serial number to each row. For example, each row will be given a number (in sequence) after every 8 rows and when there are no other numbers below it, the code will go back up again to continue the pattern again. Any help on this will be very much appreciated. Thank you!
<colgroup><col style="margin-left: 40px;"><col style="margin-left: 40px;"></colgroup><tbody>[TR]
[TD]
OLD
NUMBER
[/TD]NUMBER
[TD]
NEW
SERIAL NUMBER
[/TD]SERIAL NUMBER
[/TR]
[TR]
[TD]
1
[/TD][TD]
1
[/TD][/TR]
[TR]
[TD]
2
[/TD][TD]
4
[/TD][/TR]
[TR]
[TD]
3
[/TD][TD]
7
[/TD][/TR]
[TR]
[TD]
4
[/TD][TD]
10
[/TD][/TR]
[TR]
[TD]
5
[/TD][TD]
13
[/TD][/TR]
[TR]
[TD]
6
[/TD][TD]
16
[/TD][/TR]
[TR]
[TD]
7
[/TD][TD]
19
[/TD][/TR]
[TR]
[TD]
8
[/TD][TD]
22
[/TD][/TR]
[TR]
[TD]
9
[/TD][TD]
2
[/TD][/TR]
[TR]
[TD]
10
[/TD][TD]
5
[/TD][/TR]
[TR]
[TD]
11
[/TD][TD]
8
[/TD][/TR]
[TR]
[TD]
12
[/TD][TD]
11
[/TD][/TR]
[TR]
[TD]
13
[/TD][TD]
14
[/TD][/TR]
[TR]
[TD]
14
[/TD][TD]
17
[/TD][/TR]
[TR]
[TD]
15
[/TD][TD]
20
[/TD][/TR]
[TR]
[TD]
16
[/TD][TD]
23
[/TD][/TR]
[TR]
[TD]
17
[/TD][TD]
3
[/TD][/TR]
[TR]
[TD]
18
[/TD][TD]
6
[/TD][/TR]
[TR]
[TD]
19
[/TD][TD]
9
[/TD][/TR]
[TR]
[TD]
20
[/TD][TD]
12
[/TD][/TR]
[TR]
[TD]
21
[/TD][TD]
15
[/TD][/TR]
[TR]
[TD]
22
[/TD][TD]
18
[/TD][/TR]
[TR]
[TD]
23
[/TD][TD]
21
[/TD][/TR]
[TR]
[TD]
24
[/TD][TD]
24
[/TD][/TR]
</tbody>[/TABLE]