kevinh2320
Board Regular
- Joined
- May 13, 2016
- Messages
- 61
Column I of my worksheet is titled AMT_OWED. What I am trying to do is loop through this column and total each group of AMT_OWED rows individually. In the example below there are 3 groups that need to be totaled. Example A is what my spreadsheet looks like now (no totals for each group). Example B shows what I'd like to achieve. I've bolded the totals for emphasis. This report is run frequently and the numbers of rows for each group will vary in number of rows so code will need to account for that. Any help would be greatly appreciated.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Example A[/TD]
[TD][/TD]
[TD]Example B[/TD]
[/TR]
[TR]
[TD][TABLE="width: 83"]
<tbody>[TR]
[TD]AMT_OWED[/TD]
[/TR]
[TR]
[TD="align: right"]5,410.80[/TD]
[/TR]
[TR]
[TD="align: right"]2,827.02[/TD]
[/TR]
[TR]
[TD="align: right"]2,523.86[/TD]
[/TR]
[TR]
[TD="align: right"]557.96[/TD]
[/TR]
[TR]
[TD="align: right"]1,195.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,219.36[/TD]
[/TR]
[TR]
[TD="align: right"]60.31[/TD]
[/TR]
[TR]
[TD="align: right"]82.86[/TD]
[/TR]
[TR]
[TD="align: right"]13,485.62[/TD]
[/TR]
[TR]
[TD="align: right"]800.00[/TD]
[/TR]
[TR]
[TD="align: right"]7,924.38[/TD]
[/TR]
[TR]
[TD="align: right"]8,037.00[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]AMT_OWED[/TD]
[/TR]
[TR]
[TD="align: right"]1,053.56[/TD]
[/TR]
[TR]
[TD="align: right"]25.00[/TD]
[/TR]
[TR]
[TD="align: right"]2,681.77[/TD]
[/TR]
[TR]
[TD="align: right"]7,708.38[/TD]
[/TR]
[TR]
[TD="align: right"]67.31[/TD]
[/TR]
[TR]
[TD="align: right"]5,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,594.81[/TD]
[/TR]
[TR]
[TD="align: right"]67.31[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]AMT_OWED[/TD]
[/TR]
[TR]
[TD="align: right"]1,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]3,495.00[/TD]
[/TR]
[TR]
[TD="align: right"]3,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,025.00[/TD]
[/TR]
[TR]
[TD="align: right"]696.00[/TD]
[/TR]
[TR]
[TD="align: right"]3,041.42[/TD]
[/TR]
[TR]
[TD="align: right"]1,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]251.00[/TD]
[/TR]
[TR]
[TD="align: right"]6,500.00[/TD]
[/TR]
[TR]
[TD="align: right"]250.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,227.13[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][TABLE="width: 83"]
<tbody>[TR]
[TD]AMT_OWED[/TD]
[/TR]
[TR]
[TD="align: right"]5,410.80[/TD]
[/TR]
[TR]
[TD="align: right"]2,827.02[/TD]
[/TR]
[TR]
[TD="align: right"]2,523.86[/TD]
[/TR]
[TR]
[TD="align: right"]557.96[/TD]
[/TR]
[TR]
[TD="align: right"]1,195.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,219.36[/TD]
[/TR]
[TR]
[TD="align: right"]60.31[/TD]
[/TR]
[TR]
[TD="align: right"]82.86[/TD]
[/TR]
[TR]
[TD="align: right"]13,485.62[/TD]
[/TR]
[TR]
[TD="align: right"]800.00[/TD]
[/TR]
[TR]
[TD="align: right"]7,924.38[/TD]
[/TR]
[TR]
[TD="align: right"]8,037.00[/TD]
[/TR]
[TR]
[TD="align: right"]44,124.17[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]AMT_OWED[/TD]
[/TR]
[TR]
[TD="align: right"]1,053.56[/TD]
[/TR]
[TR]
[TD="align: right"]25.00[/TD]
[/TR]
[TR]
[TD="align: right"]2,681.77[/TD]
[/TR]
[TR]
[TD="align: right"]7,708.38[/TD]
[/TR]
[TR]
[TD="align: right"]67.31[/TD]
[/TR]
[TR]
[TD="align: right"]5,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,594.81[/TD]
[/TR]
[TR]
[TD="align: right"]67.31[/TD]
[/TR]
[TR]
[TD="align: right"]18,198.14[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]AMT_OWED[/TD]
[/TR]
[TR]
[TD="align: right"]1,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]3,495.00[/TD]
[/TR]
[TR]
[TD="align: right"]3,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,025.00[/TD]
[/TR]
[TR]
[TD="align: right"]696.00[/TD]
[/TR]
[TR]
[TD="align: right"]3,041.42[/TD]
[/TR]
[TR]
[TD="align: right"]1,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]251.00[/TD]
[/TR]
[TR]
[TD="align: right"]6,500.00[/TD]
[/TR]
[TR]
[TD="align: right"]250.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,227.13[/TD]
[/TR]
[TR]
[TD="align: right"]22,485.55[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD]Example A[/TD]
[TD][/TD]
[TD]Example B[/TD]
[/TR]
[TR]
[TD][TABLE="width: 83"]
<tbody>[TR]
[TD]AMT_OWED[/TD]
[/TR]
[TR]
[TD="align: right"]5,410.80[/TD]
[/TR]
[TR]
[TD="align: right"]2,827.02[/TD]
[/TR]
[TR]
[TD="align: right"]2,523.86[/TD]
[/TR]
[TR]
[TD="align: right"]557.96[/TD]
[/TR]
[TR]
[TD="align: right"]1,195.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,219.36[/TD]
[/TR]
[TR]
[TD="align: right"]60.31[/TD]
[/TR]
[TR]
[TD="align: right"]82.86[/TD]
[/TR]
[TR]
[TD="align: right"]13,485.62[/TD]
[/TR]
[TR]
[TD="align: right"]800.00[/TD]
[/TR]
[TR]
[TD="align: right"]7,924.38[/TD]
[/TR]
[TR]
[TD="align: right"]8,037.00[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]AMT_OWED[/TD]
[/TR]
[TR]
[TD="align: right"]1,053.56[/TD]
[/TR]
[TR]
[TD="align: right"]25.00[/TD]
[/TR]
[TR]
[TD="align: right"]2,681.77[/TD]
[/TR]
[TR]
[TD="align: right"]7,708.38[/TD]
[/TR]
[TR]
[TD="align: right"]67.31[/TD]
[/TR]
[TR]
[TD="align: right"]5,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,594.81[/TD]
[/TR]
[TR]
[TD="align: right"]67.31[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]AMT_OWED[/TD]
[/TR]
[TR]
[TD="align: right"]1,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]3,495.00[/TD]
[/TR]
[TR]
[TD="align: right"]3,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,025.00[/TD]
[/TR]
[TR]
[TD="align: right"]696.00[/TD]
[/TR]
[TR]
[TD="align: right"]3,041.42[/TD]
[/TR]
[TR]
[TD="align: right"]1,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]251.00[/TD]
[/TR]
[TR]
[TD="align: right"]6,500.00[/TD]
[/TR]
[TR]
[TD="align: right"]250.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,227.13[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][TABLE="width: 83"]
<tbody>[TR]
[TD]AMT_OWED[/TD]
[/TR]
[TR]
[TD="align: right"]5,410.80[/TD]
[/TR]
[TR]
[TD="align: right"]2,827.02[/TD]
[/TR]
[TR]
[TD="align: right"]2,523.86[/TD]
[/TR]
[TR]
[TD="align: right"]557.96[/TD]
[/TR]
[TR]
[TD="align: right"]1,195.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,219.36[/TD]
[/TR]
[TR]
[TD="align: right"]60.31[/TD]
[/TR]
[TR]
[TD="align: right"]82.86[/TD]
[/TR]
[TR]
[TD="align: right"]13,485.62[/TD]
[/TR]
[TR]
[TD="align: right"]800.00[/TD]
[/TR]
[TR]
[TD="align: right"]7,924.38[/TD]
[/TR]
[TR]
[TD="align: right"]8,037.00[/TD]
[/TR]
[TR]
[TD="align: right"]44,124.17[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]AMT_OWED[/TD]
[/TR]
[TR]
[TD="align: right"]1,053.56[/TD]
[/TR]
[TR]
[TD="align: right"]25.00[/TD]
[/TR]
[TR]
[TD="align: right"]2,681.77[/TD]
[/TR]
[TR]
[TD="align: right"]7,708.38[/TD]
[/TR]
[TR]
[TD="align: right"]67.31[/TD]
[/TR]
[TR]
[TD="align: right"]5,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,594.81[/TD]
[/TR]
[TR]
[TD="align: right"]67.31[/TD]
[/TR]
[TR]
[TD="align: right"]18,198.14[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]AMT_OWED[/TD]
[/TR]
[TR]
[TD="align: right"]1,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]3,495.00[/TD]
[/TR]
[TR]
[TD="align: right"]3,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,025.00[/TD]
[/TR]
[TR]
[TD="align: right"]696.00[/TD]
[/TR]
[TR]
[TD="align: right"]3,041.42[/TD]
[/TR]
[TR]
[TD="align: right"]1,000.00[/TD]
[/TR]
[TR]
[TD="align: right"]251.00[/TD]
[/TR]
[TR]
[TD="align: right"]6,500.00[/TD]
[/TR]
[TR]
[TD="align: right"]250.00[/TD]
[/TR]
[TR]
[TD="align: right"]1,227.13[/TD]
[/TR]
[TR]
[TD="align: right"]22,485.55[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]