View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
kotharu[_2_] kotharu[_2_] is offline
external usenet poster
 
Posts: 1
Default Total by Selection by Column, Help Please.


hi babu..may be this helps you.

Dim sumrow As Double

Sub aaa()
Sheets("Sheet1").Activate
For i = Selection.Column To Selection.Columns.Count + Selection.Column
- 1
For j = Selection.Row To Selection.Rows.Count + Selection.Row - 1
sumrow = sumrow + Cells(j, i)
Next j
Cells(Selection.Row + Selection.Rows.Count, i) = sumrow
sumrow = 0
Next i
End Sub


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/