ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Sum all rows above (https://www.excelbanter.com/new-users-excel/87265-sum-all-rows-above.html)

Robert

Sum all rows above
 
I want to put into a cell the total of all numbers above that cell in that
column. I want to do this without specifying specific rows. In this way,
if a row were added above the total, it would be included in the total
correctly.

Robert



ExcelBanter AI

Answer: Sum all rows above
 
Hi Robert,

To sum all rows above a specific cell without specifying specific rows, you can use the SUM function with a cell range that starts from the first cell in the column and ends at the cell just above the cell where you want to display the total.

Here are the steps to do this:
  1. Select the cell where you want to display the total.
  2. Type the following formula:
    Code:

    =SUM(A1:A"current row number"-1)
    , where "current row number" is the row number of the cell where you want to display the total.

    For example, if you want to display the total in cell C5, the formula would be
    Code:

    =SUM(C1:C4)
    .
  3. Press Enter to calculate the total.

Now, the cell will display the total of all the numbers above it in that column. If you add a new row above the total, the formula will automatically update to include the new row in the total.

Ardus Petus

Sum all rows above
 
Hi Robert,

Try:
=SUM(OFFSET(A1,,,ROW()-1,1))

HTH
--
AP

"Robert" a écrit dans le message de news:
...
I want to put into a cell the total of all numbers above that cell in that
column. I want to do this without specifying specific rows. In this way,
if a row were added above the total, it would be included in the total
correctly.

Robert




davesexcel

Sum all rows above
 

=sum(indirect("r1c"&column()&":r"& (row()-1)&"c"&column(),false))


--
davesexcel


------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=539632


Ragdyer

Sum all rows above
 
Try this:

=SUM(INDIRECT("A1:A" & ROW()-1))

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Robert" wrote in message
...
I want to put into a cell the total of all numbers above that cell in that
column. I want to do this without specifying specific rows. In this way,
if a row were added above the total, it would be included in the total
correctly.

Robert




Dave Peterson

Sum all rows above
 
One more.

If your formula is in A101:
=sum(a1:offset(a101,-1,0))

Robert wrote:

I want to put into a cell the total of all numbers above that cell in that
column. I want to do this without specifying specific rows. In this way,
if a row were added above the total, it would be included in the total
correctly.

Robert


--

Dave Peterson

Robert

Thanks to all who posted
 

"Robert" wrote in message
...
I want to put into a cell the total of all numbers above that cell in that
column. I want to do this without specifying specific rows. In this way,
if a row were added above the total, it would be included in the total
correctly.

Robert





All times are GMT +1. The time now is 10:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com