Add sum formula

P

Pmxgs

Hi,

I'm just starting to learn vba and I'm trying to write a macro that
automatically writes a sum formula at a specific row (row which has the words
"Total dos custos" in column A). This sum formula adds the values of the rows
above which include a sum formula as well.
For example:
At row 34 the cell A34 has the words "Total dos Custos", then from cell b34
until j34 I would like to have a sum formula which sums the cells above which
also have a sum formula.
Supposing that in column B there are already two sums, in rows 12 and 25,
the cell b34 would have the following formula =sum(b12,b25).
In cell c34 the formula would be =sum(c12,c25), etc.
Basically this creates a Grand Total in the row which has the words "Total
dos Custos".

Any help ?

thanks a lot,
Pedro
 
P

Pmxgs

I've just realized that I accidentally posted this question in Visio group
instead of Excel group, so please ignore this.

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top