billandrew
Well-known Member
- Joined
- Mar 9, 2014
- Messages
- 743
Is there a easier/shorter way to sum below each of the columns.
Right now I have -
Cells(8, 1).Value = WorksheetFunction.Sum(Range(Cells(1, 1), Cells(7, 1)))
Cells(8, 2).Value = WorksheetFunction.Sum(Range(Cells(1, 2), Cells(7, 2)))
[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]79.2[/TD]
[TD="width: 64, align: right"]46.2[/TD]
[TD="width: 64, align: right"]62.7[/TD]
[TD="width: 64, align: right"]13.4[/TD]
[/TR]
[TR]
[TD="align: right"]81.3[/TD]
[TD="align: right"]55.5[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]3.8[/TD]
[/TR]
[TR]
[TD="align: right"]103.2[/TD]
[TD="align: right"]69.7[/TD]
[TD="align: right"]79.7[/TD]
[TD="align: right"]3.8[/TD]
[/TR]
[TR]
[TD="align: right"]93.1[/TD]
[TD="align: right"]50.8[/TD]
[TD="align: right"]87[/TD]
[TD="align: right"]3.1[/TD]
[/TR]
[TR]
[TD="align: right"]96.3[/TD]
[TD="align: right"]69.3[/TD]
[TD="align: right"]85.8[/TD]
[TD="align: right"]10.7[/TD]
[/TR]
[TR]
[TD="align: right"]59.4[/TD]
[TD="align: right"]34.4[/TD]
[TD="align: right"]39.6[/TD]
[TD="align: right"]17.8[/TD]
[/TR]
[TR]
[TD="class: xl64, align: right"]78.6[/TD]
[TD="class: xl64, align: right"]40.1[/TD]
[TD="class: xl64, align: right"]70.4[/TD]
[TD="class: xl64, align: right"]10.2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]183.5[/TD]
[TD="align: right"]103[/TD]
[TD="align: right"]164.5[/TD]
[TD="align: right"]6.2[/TD]
[/TR]
[TR]
[TD="align: right"]130.8[/TD]
[TD="align: right"]74.8[/TD]
[TD="align: right"]107.6[/TD]
[TD="align: right"]20.6[/TD]
[/TR]
[TR]
[TD="align: right"]132[/TD]
[TD="align: right"]83.4[/TD]
[TD="align: right"]99.6[/TD]
[TD="align: right"]11.6[/TD]
[/TR]
[TR]
[TD="align: right"]99.3[/TD]
[TD="align: right"]57.7[/TD]
[TD="align: right"]80.5[/TD]
[TD="align: right"]6.9[/TD]
[/TR]
[TR]
[TD="class: xl64, align: right"]82.9[/TD]
[TD="class: xl64, align: right"]46.1[/TD]
[TD="class: xl64, align: right"]62.8[/TD]
[TD="class: xl64, align: right"]16.4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]275.6[/TD]
[TD="align: right"]148[/TD]
[TD="align: right"]198.1[/TD]
[TD="align: right"]35.4[/TD]
[/TR]
[TR]
[TD="align: right"]285.4[/TD]
[TD="align: right"]163.9[/TD]
[TD="align: right"]181.2[/TD]
[TD="align: right"]24[/TD]
[/TR]
[TR]
[TD="class: xl64, align: right"]325.4[/TD]
[TD="class: xl64, align: right"]106.3[/TD]
[TD="class: xl64, align: right"]232.4[/TD]
[TD="class: xl64, align: right"]41.5[/TD]
[/TR]
</tbody>[/TABLE]
Right now I have -
Cells(8, 1).Value = WorksheetFunction.Sum(Range(Cells(1, 1), Cells(7, 1)))
Cells(8, 2).Value = WorksheetFunction.Sum(Range(Cells(1, 2), Cells(7, 2)))
[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]79.2[/TD]
[TD="width: 64, align: right"]46.2[/TD]
[TD="width: 64, align: right"]62.7[/TD]
[TD="width: 64, align: right"]13.4[/TD]
[/TR]
[TR]
[TD="align: right"]81.3[/TD]
[TD="align: right"]55.5[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]3.8[/TD]
[/TR]
[TR]
[TD="align: right"]103.2[/TD]
[TD="align: right"]69.7[/TD]
[TD="align: right"]79.7[/TD]
[TD="align: right"]3.8[/TD]
[/TR]
[TR]
[TD="align: right"]93.1[/TD]
[TD="align: right"]50.8[/TD]
[TD="align: right"]87[/TD]
[TD="align: right"]3.1[/TD]
[/TR]
[TR]
[TD="align: right"]96.3[/TD]
[TD="align: right"]69.3[/TD]
[TD="align: right"]85.8[/TD]
[TD="align: right"]10.7[/TD]
[/TR]
[TR]
[TD="align: right"]59.4[/TD]
[TD="align: right"]34.4[/TD]
[TD="align: right"]39.6[/TD]
[TD="align: right"]17.8[/TD]
[/TR]
[TR]
[TD="class: xl64, align: right"]78.6[/TD]
[TD="class: xl64, align: right"]40.1[/TD]
[TD="class: xl64, align: right"]70.4[/TD]
[TD="class: xl64, align: right"]10.2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]183.5[/TD]
[TD="align: right"]103[/TD]
[TD="align: right"]164.5[/TD]
[TD="align: right"]6.2[/TD]
[/TR]
[TR]
[TD="align: right"]130.8[/TD]
[TD="align: right"]74.8[/TD]
[TD="align: right"]107.6[/TD]
[TD="align: right"]20.6[/TD]
[/TR]
[TR]
[TD="align: right"]132[/TD]
[TD="align: right"]83.4[/TD]
[TD="align: right"]99.6[/TD]
[TD="align: right"]11.6[/TD]
[/TR]
[TR]
[TD="align: right"]99.3[/TD]
[TD="align: right"]57.7[/TD]
[TD="align: right"]80.5[/TD]
[TD="align: right"]6.9[/TD]
[/TR]
[TR]
[TD="class: xl64, align: right"]82.9[/TD]
[TD="class: xl64, align: right"]46.1[/TD]
[TD="class: xl64, align: right"]62.8[/TD]
[TD="class: xl64, align: right"]16.4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]275.6[/TD]
[TD="align: right"]148[/TD]
[TD="align: right"]198.1[/TD]
[TD="align: right"]35.4[/TD]
[/TR]
[TR]
[TD="align: right"]285.4[/TD]
[TD="align: right"]163.9[/TD]
[TD="align: right"]181.2[/TD]
[TD="align: right"]24[/TD]
[/TR]
[TR]
[TD="class: xl64, align: right"]325.4[/TD]
[TD="class: xl64, align: right"]106.3[/TD]
[TD="class: xl64, align: right"]232.4[/TD]
[TD="class: xl64, align: right"]41.5[/TD]
[/TR]
</tbody>[/TABLE]