huiyin9218
Board Regular
- Joined
- Aug 7, 2018
- Messages
- 53
Hi,
How do I write a code to replace cells that contains "0" in column A with the word at the top row of each 0 group?
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD]AD[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]AC[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]DE[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]XX[/TD]
[/TR]
</tbody>[/TABLE]
Above is sample table and below is the output that i wish to obtain.
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]AD[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]AD[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]AD[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]AD[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]AC[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]AC[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DE[/TD]
[TD]XX[/TD]
[/TR]
</tbody>[/TABLE]
I would be so grateful for your help.
How do I write a code to replace cells that contains "0" in column A with the word at the top row of each 0 group?
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD]AD[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]AC[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]DE[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]XX[/TD]
[/TR]
</tbody>[/TABLE]
Above is sample table and below is the output that i wish to obtain.
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]AD[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]AD[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]AD[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]AD[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]AC[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]AC[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DE[/TD]
[TD]XX[/TD]
[/TR]
</tbody>[/TABLE]
I would be so grateful for your help.