Thread: Range Total
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Himansu Himansu is offline
external usenet poster
 
Posts: 40
Default Range Total

Hello everyone,

Anyone know why I'm not get the correct totals he
--
Dim iLastrow As Long
iLastrow = Cells(Rows.Count, ActiveCell.Column).End(xlUp).Row

Range("B3").Select
Selection.End(xlDown)(3).Select
ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,R[2]C:R[" & iLastrow & "]C)"

* e.g.: if I start from b3 to b138; b140 gets selected, but the subtotal is
b141:b142
** it should be b3:b138
--

Also how can I repeat this for muliple columns? If I have 10 columns then
the
sub-total should be done 10 times.

--

Any help will be greatly appreciated.

Have a goog day.
Himansu