VBA Sum Function??

C

Coolboy55

Is there a simple sum function in VBA? I want to add the contents o
several cells together without using a loop or a cheap "=SUM(...)
assigned string value. Does it exist
 
D

Dave Peterson

You could use +

with activesheet
msgbox .range("a1").value + .range("b1").value + .range("c1").value
end with

But I'd use that cheap that application.sum.

with activesheet
msgbox application.sum(.range("a1:c1"))
end with
 
C

Coolboy55

That doesn't seem to work. The number coming up isn't the total.
Anyone have any other suggestions on how to sum a few cells together
without a loop?
 
Top