+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : Count last N values...

  1. #1
    Registered User
    Join Date
    06-02-2010
    Location
    Braga
    MS-Off Ver
    Excel 2007
    Posts
    3

    Count last N values...

    Hi!

    I have a spreadsheet where i have this column where i insert values.
    Whenever i new to add a new value, i insert a new row, so i can add the new value at the top most cell.
    The thing is i need the sum of the last 25 values, which means the first 25 starting from the top. But when i insert a new value the formula automatically starts counting a position lower...
    I tried locking the cells manually by adding $ before the row number, but it doesn't work...

    Is there any way i can do this without having to update the formula every time i insert a new value?


    Thanks

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,696

    Re: Count last N values...

    To always sum A2:A26 try this formula

    =SUM(OFFSET(A1,1,0,25))

    That will be OK so long as you don't insert the new row right at row 1, otherwise INDIRECT, i.e.

    =SUM(INDIRECT("A2:A26"))

+ 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