You are on page 1of 7

Create a Running Balance

https://www.vertex42.com/blog/excel-formulas/create-a-running-balance-in-excel.html

This workbook shows examples from the article "Create a Running Balance in Excel that Allows you to Insert,
Rows" Regarding copyright and sharing, think of this file like a book. You may use the ideas and techniques a
here, but you may not reproduce this worksheet or copy substantial portions from it. Thank you. - Jon Wittwer

EXAMPLES

Basic Running Balance

# Deposit Withdrawal Balance


1 5.00 1.00 4.00
2 50.00 10.00 44.00
3 500.00 100.00 444.00
4 5,000.00 1,000.00 4,444.00

Formula: F14 =SUM(D14,-E14,F13)

NOTE Why use SUM instead of just =D14-E14+F13? Answer: The formula in the first row would
because of trying to add a text value (=5-1+"Balance"). The SUM function ignores text value

Problem #1: Deleting a Row Causes a #REF! Error

In this example, row 2 was deleted. The balance formula in row 3 now contains a #REF! error b
the balance in row 2 was deleted. All dependent formulas also contain #REF! errors.

# Deposit Withdrawal Balance


1 5.00 1.00 4.00
3 500.00 100.00 #REF! ◄ The result of deleting row 2
4 5,000.00 1,000.00 #REF!

Problem #2: Inserting a Row Causes an Incorrect Running Balance

In this example, a new row was inserted above row 3 and the balance formula was then copied
that the balance formula in row 3 is still referencing the balance from row 2.
In this example, a new row was inserted above row 3 and the balance formula was then copied
that the balance formula in row 3 is still referencing the balance from row 2.

# Deposit Withdrawal Balance


1 5.00 1.00 4.00
2 50.00 10.00 44.00
new row 100.00 5.00 139.00
3 500.00 100.00 444.00 ◄ Look at this formula to see the prob
4 5,000.00 1,000.00 4,444.00

Problem #3: Moving a Row via Cut & Insert Causes an Incorrect Running B

In this example, row 3 was cut and inserted above row 2. The result is that now both of these ro
incorrect running balance.

# Deposit Withdrawal Balance


1 5.00 1.00 4.00
3 500.00 100.00 444.00 ◄ Look at this formula to see the prob
2 50.00 10.00 44.00 ◄ Look at this formula to see the prob
4 5,000.00 1,000.00 4,444.00

Solution #1: Reference the Previous Balance using the OFFSET F


The OFFSET function allows you to create a reference by specifying the number of rows and columns offset fr
reference. For example, to reference the cell in the row above cell F14, you can use =OFFSET(F14,-1,0).

Syntax: =OFFSET(reference, rows, columns, [height], [width] )

# Deposit Withdrawal Balance


1 5.00 1.00 4.00
2 50.00 10.00 44.00
3 500.00 100.00 444.00
4 5,000.00 1,000.00 4,444.00

Formula: =SUM(D14,-E14,OFFSET(F14,-1,0))
Solution #2: Reference the Previous Balance using a Relative Nam

# Deposit Withdrawal Balance


1 5.00 1.00 4.00
2 50.00 10.00 44.00
3 500.00 100.00 444.00
4 5,000.00 1,000.00 4,444.00

Formula: =SUM(D14,-E14,prev_balance)

NOTE The named range prev_balance has already been created in this worksheet. Below are the
create it.

Create a Relative Named Range for prev_balance

Step 1: Select cell A2


Step 2: Go to Formulas > Define Name
Step 3: Enter prev_balance in the Name field
Step 4: Set the Scope to the current worksheet
Step 5: In the Refers To field, enter =$F1 (no dollar sign before 1)

Create a relative named range "cell_above" that works everywhere in the w

Step 1: Select cell A2


Step 2: Go to Formulas > Define Name
Step 3: Enter cell_above in the Name field Formula: =cell_above
Step 4: Set the Scope to Workbook
Step 5: Enter =!A1 in the Refers to field (no dollar signs, don't forget the exclamation mark)

Create Relative Named Ranges for Deposit and Withdrawal

# Deposit Withdrawal Balance


1 5.00 1.00 4.00
2 50.00 10.00 44.00
3 500.00 100.00 444.00
4 5,000.00 1,000.00 4,444.00

Formula: =SUM(D14,-E14,prev_balance)

Step 1: Select cell A2


Step 2: Go to Formulas > Define Name
Step 3: Enter deposit in the Name field
Step 4: Set the Scope to the current worksheet
Step 5: In the Refers To field, enter =$D2 (no dollar sign before 2)

Step 1: Select cell A2


Step 2: Go to Formulas > Define Name
Step 3: Enter deposit in the Name field
Step 4: Set the Scope to the current worksheet
Step 5: In the Refers To field, enter =$E2 (no dollar sign before 2)

REFERENCES

TEMPLATE Vertex42: Checkbook Register Template

ARTICLE Excel Help: Define and Use Names in Formulas

ARTICLE MyOnlineTrainingHub.com: Relative Named Ranges


e-in-excel.html © 2017 Vertex42 LLC

nce in Excel that Allows you to Insert, Delete, and Move


u may use the ideas and techniques and formulas explained
ions from it. Thank you. - Jon Wittwer

wer: The formula in the first row would lead to a #VALUE! error
). The SUM function ignores text values.

in row 3 now contains a #REF! error because the reference to


also contain #REF! errors.

◄ The result of deleting row 2

ct Running Balance

d the balance formula was then copied down. The problem is


alance from row 2.
◄ Look at this formula to see the problem.

ses an Incorrect Running Balance

The result is that now both of these rows are showing the

◄ Look at this formula to see the problem.


◄ Look at this formula to see the problem.

ce using the OFFSET Function


e number of rows and columns offset from a particular
you can use =OFFSET(F14,-1,0).
ce using a Relative Named Range

eated in this worksheet. Below are the steps that were used to

works everywhere in the workbook

A 123
Formula: =cell_above Err:509 Err:509

don't forget the exclamation mark)

Withdrawal

You might also like