Hey there,
suppose I have a table like this:
[TABLE="width: 320"]
<colgroup><col width="64" span="5" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: center"]V[/TD]
[TD="width: 64, align: center"]From[/TD]
[TD="width: 64, align: center"]To[/TD]
[TD="width: 64, align: center"]index[/TD]
[TD="width: 64, align: center"]decision[/TD]
[/TR]
[TR]
[TD="align: center"]v1[/TD]
[TD="align: center"]D1[/TD]
[TD="align: center"]A1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[/TR]
[TR]
[TD="align: center"]v2[/TD]
[TD="align: center"]D1[/TD]
[TD="align: center"]A1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[/TR]
[TR]
[TD="align: center"]v3[/TD]
[TD="align: center"]D1[/TD]
[TD="align: center"]A1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[/TR]
[TR]
[TD="align: center"]v4[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[/TR]
[TR]
[TD="align: center"]v5[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[/TR]
[TR]
[TD="align: center"]v6[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]no ship[/TD]
[/TR]
[TR]
[TD="align: center"]v7[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]no ship[/TD]
[/TR]
[TR]
[TD="align: center"]v8[/TD]
[TD="align: center"]D3[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]no ship[/TD]
[/TR]
[TR]
[TD="align: center"]v9[/TD]
[TD="align: center"]D3[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[/TR]
[TR]
[TD="align: center"]v10[/TD]
[TD="align: center"]D3[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[/TR]
</tbody>[/TABLE]
how can i create a macro to sum up by group (from, to , index) like following:
[TABLE="width: 384"]
<colgroup><col width="64" span="6" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: center"]V[/TD]
[TD="width: 64, align: center"]From[/TD]
[TD="width: 64, align: center"]To[/TD]
[TD="width: 64, align: center"]index[/TD]
[TD="width: 64, align: center"]decision[/TD]
[TD="width: 64, align: center"]# of ship[/TD]
[/TR]
[TR]
[TD="align: center"]v1[/TD]
[TD="align: center"]D1[/TD]
[TD="align: center"]A1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]v2[/TD]
[TD="align: center"]D1[/TD]
[TD="align: center"]A1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]v3[/TD]
[TD="align: center"]D1[/TD]
[TD="align: center"]A1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]v4[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]v5[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]v6[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]no ship[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]v7[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]no ship[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]v8[/TD]
[TD="align: center"]D3[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]no ship[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]v9[/TD]
[TD="align: center"]D3[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]v10[/TD]
[TD="align: center"]D3[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[TD="align: center"]2[/TD]
[/TR]
</tbody>[/TABLE]
please advise!
Thanks!
suppose I have a table like this:
[TABLE="width: 320"]
<colgroup><col width="64" span="5" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: center"]V[/TD]
[TD="width: 64, align: center"]From[/TD]
[TD="width: 64, align: center"]To[/TD]
[TD="width: 64, align: center"]index[/TD]
[TD="width: 64, align: center"]decision[/TD]
[/TR]
[TR]
[TD="align: center"]v1[/TD]
[TD="align: center"]D1[/TD]
[TD="align: center"]A1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[/TR]
[TR]
[TD="align: center"]v2[/TD]
[TD="align: center"]D1[/TD]
[TD="align: center"]A1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[/TR]
[TR]
[TD="align: center"]v3[/TD]
[TD="align: center"]D1[/TD]
[TD="align: center"]A1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[/TR]
[TR]
[TD="align: center"]v4[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[/TR]
[TR]
[TD="align: center"]v5[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[/TR]
[TR]
[TD="align: center"]v6[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]no ship[/TD]
[/TR]
[TR]
[TD="align: center"]v7[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]no ship[/TD]
[/TR]
[TR]
[TD="align: center"]v8[/TD]
[TD="align: center"]D3[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]no ship[/TD]
[/TR]
[TR]
[TD="align: center"]v9[/TD]
[TD="align: center"]D3[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[/TR]
[TR]
[TD="align: center"]v10[/TD]
[TD="align: center"]D3[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[/TR]
</tbody>[/TABLE]
how can i create a macro to sum up by group (from, to , index) like following:
[TABLE="width: 384"]
<colgroup><col width="64" span="6" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: center"]V[/TD]
[TD="width: 64, align: center"]From[/TD]
[TD="width: 64, align: center"]To[/TD]
[TD="width: 64, align: center"]index[/TD]
[TD="width: 64, align: center"]decision[/TD]
[TD="width: 64, align: center"]# of ship[/TD]
[/TR]
[TR]
[TD="align: center"]v1[/TD]
[TD="align: center"]D1[/TD]
[TD="align: center"]A1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]v2[/TD]
[TD="align: center"]D1[/TD]
[TD="align: center"]A1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]v3[/TD]
[TD="align: center"]D1[/TD]
[TD="align: center"]A1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]v4[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]v5[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]v6[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]no ship[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]v7[/TD]
[TD="align: center"]D2[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]no ship[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]v8[/TD]
[TD="align: center"]D3[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]no ship[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]v9[/TD]
[TD="align: center"]D3[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]v10[/TD]
[TD="align: center"]D3[/TD]
[TD="align: center"]A3[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]ship[/TD]
[TD="align: center"]2[/TD]
[/TR]
</tbody>[/TABLE]
please advise!
Thanks!