It depends on the Excel version,
Excel 2003 and later
=SUBTOTAL,109,A1:A1000)
will sum only visible rows
For earlier versions you can do it if they are filtered
=SUBTOTAL(9,A1:A1000)
If they are hidden in earlier versions you need to write code to do it
--
Regards,
Peo Sjoblom