3. Named variables

=A1+A2

The formula shown above is so simple that it is easy to understand what it is doing. But things can get (and do) become far more complicated. For instance, consider a formula like this:

complicated formula

It is much more difficult to understand the purpose of this formula. You can see that is seems to be adding up a range of cells and also multiplying a cell value but why?

Now lets set up the same formula in a slightly different way

using named variables

It is still a little complicated but now it is much more clear as to what it is doing. In this case it is taking the price variable and VAT variable to work out the VAT on an item, then adds the postage costs. It then adds these to the total sales.

This can be done in a spreadsheet because it supports the idea of a 'Named variable'.

A named variable substitutes text for referencing a cell or range of cells.

Creating a Named variable

This is quite straight forward as it can be done right on screen.

Single Cell Name

Select the cell you want to use (B2)

In the top left box enter the name you want to use (DISCOUNT) and press enter.

That's it. You can now use DISCOUNT instead of cell B2 in a formula.

 

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: spreadsheet named variables