bertieboots
New Member
- Joined
- Oct 3, 2015
- Messages
- 11
Hi all,
Is there a way to loop through a column(lets say A),where most of the cells are empty(size of the column will varying in length),but when the loop hits a cell that has data in(please see Fig1)the data is copied over to the adjacent cell in the next column.Any help appreciated
Fig1
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]apple
[/TD]
[TD]apple
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]grapes
[/TD]
[TD]grapes
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]pear
[/TD]
[TD]pear
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Is there a way to loop through a column(lets say A),where most of the cells are empty(size of the column will varying in length),but when the loop hits a cell that has data in(please see Fig1)the data is copied over to the adjacent cell in the next column.Any help appreciated

Fig1
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]apple
[/TD]
[TD]apple
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]grapes
[/TD]
[TD]grapes
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]pear
[/TD]
[TD]pear
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Last edited: