That is true only if the rows are visible or hidden as a result of a filter.
If that is the case, the Worksheetfunction.Subtotal(9,Range) would get the
sum of the visible cells. If they have been hidden using code or manually,
then subtotal would not work.
in either case
Dim rng as Range, rng1 as Range
set rng = Range("B9:B35")
set rng1 = rng.Specialcells(xlVisible)
msgbox worksheetFunction.Sum(rng1)
would sum just the visible cells.
--
Regards,
Tom Ogilvy
Kieran wrote in message
...
James,
use application.worksheetfunction.subtotal(9, range).
Subtotal has many subfucntions (as the 9 parameter) suggests, but all
the functions only operate on visible rows.
---
Message posted from http://www.ExcelForum.com/