View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Help for subtotal

Hi,

Maybe this

lastrow = Cells(Rows.Count, "O").End(xlUp).Row
ActiveCell.Formula = "=SUBTOTAL(9,O3:O" & lastrow & ")"

Mike

"pol" wrote:

Please help in the following example how I can give end of column
instead of O193


ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,O3:O193)"

with thanks and regards

Pol