Excel VBA - Sum up a column
Posted
by kojof
on Stack Overflow
See other posts from Stack Overflow
or by kojof
Published on 2010-06-02T18:55:51Z
Indexed on
2010/06/02
19:04 UTC
Read the original article
Hit count: 264
Hi, I'm trying to sum up a column in Excel VBA , however because there are blank spaces, I'm getting 0 as the sum.
Dim rExternalTotal As Range , dExternalTotal as Double
Set rExternalTotal = Range(rReportData.Offset(0, 0), rReportData.Offset(261, 0).End(xlUp))
dExternalTotal = Application.WorksheetFunction.Sum(rExternalTotal)
dExternalTotal is always zero. I cannot delete the blank spaces on the work sheet. Can anyone suggest a way to do the sum programatically?
© Stack Overflow or respective owner