I. PARTS OF AN EXCEL FORMULA
= : all Excel functions begin with an equal sign
Function: a function is a predefined formula that’s built into Excel. In this example, the function is SUM which adds all of the values in the cells together.
Operation: specify what you want to do to the function (in this example, we use the operation * for multiplication). A common example you’re probably familiar with is a mathematical operator (like + for addition, - for subtraction, * for multiplication, and ^ for exponents).
There are four types of operators: mathematical, comparison, text concatenation, and reference. Since there’s so many, I’ll be doing a post about them in the future (but you can read about them here if you’re interested in the mean time).
Constant (in this example the constant is 1.06)
It’s a best practice to try to reduce constants as much as possible and instead reference a cell that has that constant inputted. Why? If we used the example above of calculating the amount spent on office supplies and we pretend that our state has 6% sales tax (note: to get the total sales tax you would do the original amount (1.00) + 0.06 for 6% sales tax which is why I did 1.06). But what if you buy your supplies during tax free week and now you don’t have to pay sales tax at all? Since I used a constant in my formula, I’d have to go back by hand and edit the formula wherever the 6% appears. If I referenced a cell, I could change the sales tax to 0% and every other amount would automatically be recalculated.
If we were to redo the formula to get rid of the constant, it would look something like this:
II. READING AN EXCEL FORMULA DEFINITION
Anytime you type a formula, Excel will automatically give you the definition of that formula so if you know how to read a formula in general then you’ll be able to pick up on almost any formula (obviously some formulas may still need some extra explanation, but learning to read the general formula syntax will make it so you don’t have to memorize any formula parts - just follow Excel!).
Whatever comes after the ‘=‘ is the formula (in this case VLOOKUP)
Everything in the ‘( )’ are the arguments (each argument is separated by a comma)
Arguments NOT in [ ] are mandatory so you need to specify them of the formula will error
Arguments in [ ] are optional so if you don’t specify them the formula will still work
Be careful! Sometimes you don’t get the answer you want because you forgot to specify an optional argument.
Referencing is when you refer to a cell in your Excel formula (in the example at the top, the reference is B2:B5. But there are different types of referencing:
Relative Referencing: this means that the cell reference will change as you drag the formula up/down or right/left.
Absolute Referencing: this means that you DON’T want the cell reference to change as you drag the formula up/down or right/left. In Excel, absolute referencing is represented with a $ (you can also hit F4 to cycle through the types of absolute references!)
References are super important because the most common reason my formulas error is because I forgot to reference properly. While they can be confusing, once you see the examples below it’ll make a lot more sense!
A2 means that you want the column and row to change as you drag the formula
$A$2 means that you want BOTH the column and the row to stay the same (in other words, you want it to always reference one specific cell no matter where the formula is on the sheet). This is a really common use for references!
$A2 means that you want the row but NOT the column to change as you drag the formula around
A$2 means that you want the column but NOT the row to change as you drag the formula around
Let’s use a modified version of the supplies example to illustrate.
In this example (that it is very simple), I only typed the formula in C5 and then copied it down. But because I used the absolute reference ($B$1), so it always referenced the cell that had the tax amount. So with absolute referencing, I can write the formula in only one cell and copy it to hundreds of rows or columns.
Now you know about the parts of a formula, reading a formula, and cell referencing. These basics are a good foundation so you can tackle more complicated things in Excel and even if you don’t, this information is often enough to use Excel simply. If something didn’t make sense in this, please send me an ask!
Although I make my own examples and write all the explanations myself, I do use sources to fact check myself. You can find those sources here: Parts of a Formula, Referencing, Overview of formulas.
part (1/??) of my excel series