Help with summation after macro executed

  • Thread starter Thread starter derekvho
  • Start date Start date
D

derekvho

I have a macro that I created that inserts rows. At the bottom of the
sheet, I have several summary rows that add the values of the inserted
rows according to what the header row is. My problem is that the
summary rows do not add the inserted rows after the macro has been
executed.

I was perhaps thinking of a SUMIF but that doesn't seem to work
effectively. Any ideas?


Thanks in advance,
Derek
 
Use a formula of

=SUM(A2:OFFSET(A99,-1,0)

assuming the total starts in A99

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Similar question...
Let's say you have a range of 5 cells (A231:A235). The 6th cell is a
summation cell (A236).
1. Highlight the entire 6th row
2. Right-click to insert a row and choose insert
3. In the summation cell (now A237), Excel will only add up the
original 5 rows.

Is there a way for Excel to add the inserted 6th cell's data in the new
summation cell (A237)?
 
Yes

=SUM(A231:OFFSET(A236,-1,0))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 

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

Back
Top