'VBA to sum up multi worksheets

I'm building a Budget template in Excel and getting a problem in Consolidation sheet.

I'm looking for a VBA can help me to auto sum up data from projects sheets. Please see the picture below.

Need to Sum up all project sheets per month and per account
Need to Sum up all project sheets per month and per account

It will be the same if we put the formula like:

Consolidation!D2 = sum(A!D2, B!D2, C!D2)

Consolidation!D3 = sum(A!D3, B!D3, C!D3)
...

Consolidation!E2 = sum(A!E2, B!E2, C!E2)
Consolidation!E3 = sum(A!E3, B!E3, C!E3)
...

I know we can put a formula like: Sum(A:C!D2),etc... but really need it with a VBA code.



Solution 1:[1]

Take a look at this, https://www.youtube.com/watch?v=FI4HkCzMaIk it may help solve the problem and give you more flexibility. It provides an introduction to appending data using inbuilt functionality (which is easier to maintain). You will have to adapt it for your specific needs but there's a great starting point. I've used this append approach quite a few times recently and it's proved to be a real time saver.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Troystav