/

Create Running Total Column in LibreOffice Calc

14.2K views
5

This short tutorial will explain how to create a running total column in LibreOffice Calc.

Running total is a concept of summing data items from the beginning to till current stage. Running total can give you a glimpse of total values as the data sets grow. It is mostly useful for many use cases, e.g. to track the total sales value to date, to track current account balance considering withdrawals and deposits and so on.

Running Total - Calc
Running Total – Calc

It is straightforward to implement in LibreOffice Calc. Here’s how you can do it.

Create a Running Total Column in Calc

  • We have a data series as below where the B column has total sales $ with dates. We would create a running total per day in Column C.
Running Total - Data Sets
Running Total – Data Sets
  • In cell C2, enter formula =B2. This would ensure that the first value remains the same value of B2.
  • In cell C3, enter the below formula and press enter. Drag the fill handle till your data sets exist. $B$2 is the absolute reference which means it always refers to cell B2 even if the formula changes when we drag the fill handle. B3 refers to relative reference, i.e. it changes as per the current row number.

=SUM($B$2:B3)

  • You can see the running total is calculated.
Running Total in Calc
Running Total in Calc

 

Case Study: 1

Based on comment

What if, in the above example, for some days, total sales are $0? In those cases, if you apply the above formula in Col C, an identical running total would be calculated for empty total sales – see below.

Running Total - Empty rows
Running Total – Empty rows

So, to overcome that, use a quick IF function as below to check whether the corresponding row has a non-zero value and then calculate the running total; otherwise, skip it. Enter below in cell C3:

=IF(B3>0,SUM($B$2:B3),””)

You can see the total is not calculated for C4 and C5 because B4 and B5 do not have any sales.

Running Total - Empty Rows-Solution
Running Total – Empty Rows-Solution

Summary

This is how you can implement quick running total in Calc. You can extend this formula in different cases to achieve a running total.

Drop a comment below if you have any questions. If you like this tutorial, take a minute to share it using the buttons below. Also, follow us/subscribe for tips and tutorials in LibreOffice.

Join our Telegram channel and stay informed on the move.

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

5 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
luvr

Alternatively, you could type the following formula in cell C3:

=(C2+B3)

Steve

Is there any way you can enter the formulae for (using the above example) column C, but only display a value in column C if there is an entry for that row? Otherwise it seems every time you create an entry you would have to extend or enter a new formula, otherwise you would have a bunch of identical running totals extending beyond the end of the useful document.

Hating spreadsheets for now

I can’t understand why anyone would do it any other way. Obviously you only want something calculated if a field is there offering something to calculate.

Its not about getting a cell to do something. Its about getting a column to do something.