+ Reply to Thread
Results 1 to 8 of 8

Help with summation after macro executed

  1. #1
    derekvho@gmail.com
    Guest

    Help with summation after macro executed

    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


  2. #2
    Bob Phillips
    Guest

    Re: Help with summation after macro executed

    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)

    <derekvho@gmail.com> wrote in message
    news:1145459319.835823.308730@g10g2000cwb.googlegroups.com...
    > 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
    >




  3. #3
    derekvho@gmail.com
    Guest

    Re: Help with summation after macro executed

    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)?


  4. #4
    derekvho@gmail.com
    Guest

    Re: Help with summation after macro executed

    Would this same formula work?


  5. #5
    Bob Phillips
    Guest

    Re: Help with summation after macro executed

    Yes

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

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    <derekvho@gmail.com> wrote in message
    news:1145462680.901263.270290@g10g2000cwb.googlegroups.com...
    > Would this same formula work?
    >




  6. #6
    derekvho@gmail.com
    Guest

    Re: Help with summation after macro executed

    Thank you Bob


  7. #7
    derekvho@gmail.com
    Guest

    Re: Help with summation after macro executed

    Thank you Bob


  8. #8
    derekvho@gmail.com
    Guest

    Re: Help with summation after macro executed

    Thank you Bob


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1