Hi,
I m new to VBA and my problem is explained below with example
i need to go from this :
[TABLE="width: 100"]
<tbody>[TR]
[TD]rank[/TD]
[TD]name[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]jon[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]alex[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]william[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]josh[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]jamies[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]sarah[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]angela[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]haley[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]julie[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]sofia[/TD]
[/TR]
</tbody>[/TABLE]
In this table , i need to append a text which has no column name. 'A' has to be appended the end of every row until the next occurrence of 1 in column rank . from the second occurrence of 1 in rank column i need 'B' to be append at the end of every row.
after applying the code, it should look like this.
[TABLE="width: 100"]
<tbody>[TR]
[TD]rank[/TD]
[TD]name[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]jon[/TD]
[TD] A[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]alex[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]william[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]josh[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]jamies[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]sarah[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]angela[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]haley[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]julie[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]sofia
[/TD]
[TD]B[/TD]
[/TR]
</tbody>[/TABLE]
Any help on writing this code will be very much appreciated.
Thanks,
Manvit
I m new to VBA and my problem is explained below with example
i need to go from this :
[TABLE="width: 100"]
<tbody>[TR]
[TD]rank[/TD]
[TD]name[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]jon[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]alex[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]william[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]josh[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]jamies[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]sarah[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]angela[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]haley[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]julie[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]sofia[/TD]
[/TR]
</tbody>[/TABLE]
In this table , i need to append a text which has no column name. 'A' has to be appended the end of every row until the next occurrence of 1 in column rank . from the second occurrence of 1 in rank column i need 'B' to be append at the end of every row.
after applying the code, it should look like this.
[TABLE="width: 100"]
<tbody>[TR]
[TD]rank[/TD]
[TD]name[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]jon[/TD]
[TD] A[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]alex[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]william[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]josh[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]jamies[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]sarah[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]angela[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]haley[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]julie[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]sofia
[/TD]
[TD]B[/TD]
[/TR]
</tbody>[/TABLE]
Any help on writing this code will be very much appreciated.
Thanks,
Manvit