the numbers are not in a single row or column so how do i do that?!! please help. in vba that is
the numbers are not in a single row or column so how do i do that?!! please help. in vba that is
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:[vba]sumOfRanges = WorksheetFunction.Sum("A1:A5", "B12:G12", "Z22")[/vba]
You need to give more detail or post an example.
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Don't bother.
Hmmm... you know something we should be aware of fumei?
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
Hi Ted
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
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.
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
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.
Steve
"Nearly all men can stand adversity, but if you want to test a man's character, give him power."
-Abraham Lincoln