# Working with Circular references in Excel

## Types of circular references

Simplistically speaking there are only a few types of circular references to discern:

### Deliberate circular references

The most important thing to decide up front is whether the model you are trying to calculate actually is of a circular nature. Very often there is a way to rewrite your calculations in such a way that no circular references are needed. This is always the preferred method to use.

Some people deliberately create (sets of) circular reference chains to have a calculation model do iterative calculations. Examples may include models of a chemical facility where (part of) an input stream of a process is a recycled output stream of the same process. Distillation plants often have such streams and if you want to calculate a model of such plant, using a circular reference may be a good way to model your process.

If -and only if- you are convinced you really need circular references to solve your problem, meticulously document your model, stating clearly what your intentions are and how the model functions. Especially important: Devise a way to clearly indicate the circular reference chain.

There are some sub-types of circular references to discern. I list them here under the deliberate circular references, assuming that is the only case where it could be important knowing which subtypes there are.

#### Self-referencing cells

The simplest type of a circular reference is where a cell references itself. This is sometimes used when trying to have a value in a cell which only updates under certain circumstances. An example can be the following:

Suppose you want to keep track of when an entry was made in a certain cell, without using VBA. One way could be the use of the TODAY() function, in combination with the IF function:

Self-referencing cell

As soon as an entry is made in cell A1, the IF function's test evaluates to false, making the formula in cell B1 point to its own value, being the date of the last time Excel recalculated.

#### Single circles

When all cells within a circle are not part of any other circle, we have a single circular reference chain. An example of such a single circle is depicted below:

A single circular chain of cells

Cell C2 uses the value of cell D3, which uses the value of cell C4, which uses the value of cell B3, which in turn uses the value of the first cell, C2, completing the circle.

#### Multiple circles

To complicate things, cells may be part of more than one circular reference chain. See the example below:

Multiple circles

In the example above, there are two circles. The first circle is A-B-C-D-E-F-A
(green arrows). The second one is A-B-C-D-E-**G-A**, the
red
arrows. Detecting such multiple circular chains is very difficult.

Note that circular reference circles can span multiple worksheets and even multiple workbooks (try to avoid that like the plague!). If you need a circular reference, I advise you to try to keep the cells which are included in the circle as close together as you can so they can be viewed on a single screen all at once. This makes troubleshooting and validating your model easier.

### Accidental circular references

More often, people inadvertently create a circular reference, for example by having a SUM function which includes the cell the SUM function itself resides in.

Example: In cell A10, you write this function: =SUM(A1:A10)

Of course this formula is intended to sum the values in the cells above the cell with the sum function, so the argument for the SUM function should be A1:A9.

## Comments

Showing last 8 comments of 25 in total (Show All Comments):Comment by: Dev (5/23/2014 6:08:03 PM)

I hope you have now understand my problem and waiting your response.

Comment by: Jan Karel Pieterse (5/24/2014 4:59:14 PM)

Rather thn doing it in a difficult way I would be pragmatic and enter each amount you receive in its own cell beneath each other and simply use =SUM(C1:C100) to calculate the total.

Comment by: Dimitrios (7/8/2014 1:47:23 PM)

lets say we have 5 cells

a b c d e

100 (a+c)/2 (b+d)/2 (c+e)/2 0

i want the first calculation in excel to be

100 50 0 0 0

but exel calculates each cell seperately and i get

100 50 25 12.5 0

Comment by: Jan Karel Pieterse (7/9/2014 10:36:21 AM)

I'm not sure I understand what you are trying to do, can you perhaps elaborate?

Comment by: Alaa (11/27/2014 9:38:56 PM)

What the calculation i can write in C1 cell and D1 cell for this issue ?

Thanks in advance

Comment by: Jan Karel Pieterse (11/28/2014 1:26:52 PM)

WHile this is theoretically possible using circular references, I would not recommend doing this. I would simply enter the numbers below eqach other in a small table and add the column of that table. That way you also keep a record of the numbers you enetered in the past.

Comment by: Alaa (11/28/2014 2:59:01 PM)

And if I made 30 columns for each day of the month, the sheet will be very complicated to supervisors whose using this sheet specially that I protect the sheet so I can't use "grouping tool"

So help me if there's any way to solve this issue by circular reference or any other suitable solution

Thanks in advance for your appreciated support.

Comment by: Jan Karel Pieterse (11/28/2014 3:27:37 PM)

I think the easiest is to make a separate tab for each rep. On that tab you place a small table with just two columns:

Date Sale

Then you let them enter dates and amounts in these two columns.

## Have a question, comment or suggestion? Then please use this form.

If your question is not directly related to this web page, but rather a more general "How do I do this" Excel question, then I advise you to ask your question here: www.eileenslounge.com.