PDA

View Full Version : [SOLVED:] VBA Sum function NOT calculating small values



simora
11-01-2020, 07:20 AM
How can I get VBA to calculate values of less than $1 ?

I have code which works, until I get values of less than $1
How can I modify it so that it sums these values correctly.
I am trying to sum ALL values in a Visible Range after I've filtered the data.
eSum works unless the total value is less than $1



eSum = WorksheetFunction.Sum(myRange.SpecialCells(xlCellTypeVisible))
MsgBox eSum

Dave
11-01-2020, 08:02 AM
I'm guessing...

Dim eSum as Double
HTH. Dave

Paul_Hossler
11-01-2020, 09:24 AM
Post an example workbook

simora
11-01-2020, 11:27 AM
Thanks Guys:

My Oversight. myRange was incorrectly defined.

As soon as I created a sheet with "Dummy Values " I saw it.

Again Thanks !