huiyin9218
Board Regular
- Joined
- Aug 7, 2018
- Messages
- 53
Hi,
How do i write a code to count total of "blue" and "red" in each school? The sum of blue and red have to be written at the cell next to the school.
Colors other than blue and red are ignored. The rows in each school is inconsistent.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]AB School[/TD]
[TD="align: center"]4[/TD]
[/TR]
[TR]
[TD]Blue[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Blue[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Red[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Red[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]CD School[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD]Red[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Yellow[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I would be so grateful for your help.
How do i write a code to count total of "blue" and "red" in each school? The sum of blue and red have to be written at the cell next to the school.
Colors other than blue and red are ignored. The rows in each school is inconsistent.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]AB School[/TD]
[TD="align: center"]4[/TD]
[/TR]
[TR]
[TD]Blue[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Blue[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Red[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Red[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]CD School[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD]Red[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Yellow[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I would be so grateful for your help.