PDA

View Full Version : how do i sum a total of multiple numbers



miketallica
09-03-2009, 09:28 AM
the numbers are not in a single row or column so how do i do that?!! please help. in vba that is

nst1107
09-03-2009, 10:19 AM
Not sure of your particular situation, but supposing you have values in A1:A5 and B12:G12 and Z22 that you'd like to sum. And supposing you have a variable, sumOfRanges, that you'd like to assign the sum to. The code could look something like this:sumOfRanges = WorksheetFunction.Sum("A1:A5", "B12:G12", "Z22")

mdmackillop
09-03-2009, 02:19 PM
You need to give more detail or post an example.

fumei
09-11-2009, 02:39 PM
Don't bother.

Aussiebear
09-12-2009, 01:40 AM
Hmmm... you know something we should be aware of fumei?

GTO
09-12-2009, 04:44 AM
Hi Ted :hi:

A howdy and hope all is great with you and yours!

I'm not sure whether "Don't look a gift horse in the mouth." is a saying down there, but by golly, the offer of extended and extra effort was muzzle-punched here.

http://vbaexpress.com/forum/showthread.php?t=28373

A great day to your and yours,

Mark

Aussiebear
09-12-2009, 02:18 PM
Mark, maybe the OP was having an off day with the other question. How about we give another chance to communicate? Maybe this time it'll be better for all of us.

lucas
09-12-2009, 02:35 PM
Ted, they should still know about the other thread. I was getting ready to post a link to it but noticed that Mark had already done as much.