VBA sum previous cells

bookworm121

New Member
Joined
Jun 22, 2011
Messages
39
How would you go through each column in worksheet called "Main" and create summed up columns in worksheet called "Work".
When summing, each cell is it's own value + all previous values in a column

What i mean by summed up columns is this:

If in Main: column A has these values:

1
2
5
6

Then in Work I want these values in column A:

1
3
8
14

And this needs to be done for all columns in worksheet "Main"
 
You're welcome. Thanks for the follow-up.

For the future, you would be best to start a new thread for follow-up questions to old threads. You will get many more helpers looking at a new thread. You can put a link to the old one in your post to provide the background if you want.
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Dear Experts, I've been reading and digesting this topic last a couple of days, trying to generate a similar code to create summed pairs like shown below:
B14 = B5+B6,
B15 = B5+B7,
B16= B5 + B8
...
B20= B6 + B7
B21 = B6 + B8
...
B25 = B7 + B8
B26 = B7 + B9
...

Herein, the input data B5:B11 thru to F5:F11 is dynamic with some blank cells before (B1:B4) - after the input block, B12:B13. I manually generated a computed block B13:B34 to F14:F34 right under the input block for clarity, though it can be computed block can be plotted anywhere in the same sheet or copied to another sheet. The problem I have is that dynamic input block B5:B11 F5:F11 can be a lot longer than 7 raws, therefore without vba it requires manipulations with formula everytime when block gets longer. Would appreciate your inputs how to tackle this challenge

1725863857277.png
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,224,084
Messages
6,176,272
Members
452,718
Latest member
Nyxs_Inquisitor

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top