How does a formula work?
Formulas are equations that will perform calculations on the values you have entered into your spreadsheet. A formula in Excel will always begin with a equals sign, this tells Excel that the characters following it constitute a formula. Following the equals sign are the elements of a calculation separated by calculation operators. A formula may contain any or all of the following, functions, references, constants and operators. An example of a simple formula is given below;
=PI()*(C6+5)
The above example contains each of these elements. We will now consider the role of each of these to understand how the formula works.
Functions
Functions are predefined formulas that perform calculations by using specific values in a particular order or structure. A function begins with an equals sign followed by the function name, an opening bracket, the arguments for the function separated by commas and then a closing bracket. For example, the PI() function returns the value of pi i.e. 3.142.
Operators
An operator is a sign or symbol that specifies the type of calculation that you want to perform on the elements of the formula. Operators may be of four types, mathematical e.g. * (multiplication sign), comparison e.g. greater than, logical e.g. & (and) and reference e.g. : (colon).
References
A reference identifies a cell or range of cells in a worksheet and tells Excel where to look for the data you want to use in the formula. You can refer to cells within the worksheet, in other sheets in the same workbook and even to other workbooks. For example, the reference A2 would return the value in the cell A2.
Constants
A constant is a value that is not calculated and therefore does not change, for example the date 3/10/06 or the number 105. If you use constant values in a formula instead of references to cells the result will only change if you modify the formula yourself.
Formulas calculate values in a specific order. Excel calculates the formula from left to right. If you combine more than one operator in a formula, for example both a multiplication and plus operator, you may want to specify the order in which these operations is completed. This is done by adding brackets around the part of the formula which is to be calculated first.
An example formula
We can now return to our original formula and look again at the elements within it.
=PI()*(C6+5)
PI() = a function that will return the value of PI (3.142)
* = the mathematical operator for multiplication
C6 = a reference which will look up the value in cell C6
+ = the mathematical operator for addition
5 = a constant value
If the value in cell C6 is 10 then this formula will first add 10 to 5, and then multiply the resultant (15) by 3.142 to return the value 47.12.
The above provides just a very simple example to provide a basic overview of the way formulas work. There are numerous other functions and operators that can be applied together with many ways of referencing data. By undertaking some basic excel training you can quickly gain the knowledge to put all these functions to use and get Excel to do the hard work for you.
0 comments:
Post a Comment