Is there a simple sum function in VBA? I want to add the contents of several cells together without using a loop or a cheap "=SUM(...)" assigned string value. Does it exist?
Is there a simple sum function in VBA? I want to add the contents of several cells together without using a loop or a cheap "=SUM(...)" assigned string value. Does it exist?
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
Dave Peterson
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?
Never mind, it worked fine. My apologies.![]()
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
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
Coolboy55 wrote:
>
> Is there a simple sum function in VBA? I want to add the contents of
> several cells together without using a loop or a cheap "=SUM(...)"
> assigned string value. Does it exist?
>
> --
> Coolboy55
> ------------------------------------------------------------------------
> Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
> View this thread: http://www.excelforum.com/showthread...hreadid=400896
--
Dave Peterson
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks