Do not add hidden values to SUM

  • Thread starter Thread starter Roger Winkles
  • Start date Start date
R

Roger Winkles

Anyone know of an easy way to only SUM visible rows in a
column of data? The only method I know of is to use
filters, and that is not an option.

Thanks,

Roger
 
try
Sub subvis()
MsgBox Application.Sum(ActiveSheet.Columns("d").SpecialCells(xlVisible))
End Sub

as a function
Function subvisa(x)'Functions always go in regular modules
subvisa = Application.Sum(ActiveSheet.Columns(x).SpecialCells(xlVisible))
End Function
then on the worksheet =subvisa("d") for column D
 
Back
Top