+ Reply to Thread
Results 1 to 6 of 6

Summing a spesific number of rows

  1. #1
    Registered User
    Join Date
    02-12-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007, 2013
    Posts
    89

    Summing a spesific number of rows

    Say I have 100 rows, and I want to sum the content of rows 1 - X, X being an input on the sheet. So if X = 90, I want to sum row 1-90. How can I do this?
    Last edited by Test123Test; 04-22-2012 at 10:19 AM.

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Summing a spesific number of rows

    If your numbers to sum are in column A, and the number of the row to sum to is in B1 then something like this:

    =SUM(INDIRECT("A1:A" & B1))

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Summing a spesific number of rows

    Or
    =SUM(A1:INDEX(A:A,B1))

  4. #4
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Summing a spesific number of rows

    So many ways to do this one ...

    =SUM(A1:OFFSET(A1,B1-1,0))

    =SUMPRODUCT(A1:A1000,--(ROW(A1:A1000)<=B1))

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Summing a spesific number of rows

    But this one would be least resource hungry (non-volatile):
    =SUM(A1:INDEX(A1:A100,B1))

  6. #6
    Registered User
    Join Date
    02-12-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007, 2013
    Posts
    89

    Re: Summing a spesific number of rows

    Okay thanks guys! repped and marked as solved

+ 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