Excel is based on rows and columns containing data values. These readily provide a visual look at your data. But the true power of Excel lies in formulas. Formulas help you perform calculations, analyze values, and streamline your work. While they can take countless forms, formulas share the same basic framework. Let’s learn how to write a formula in Microsoft Excel.
How to Write a Formula in Microsoft Excel
Want to know the foundation of every single formula in Microsoft Excel? The equal = sign. That’s right – it’s the first step in every single formula that you will ever write in Microsoft Excel. No formula can operate without it. In essence, it tells Excel that any inputs following it represent a formula. In other words, the = is always the first character in any formula.
Formulas exist within individual cells, but as you’ll soon see, they don’t necessarily stand alone. Formulas can reference other cells, other worksheets, and even completely separate Excel spreadsheet files! They vary in complexity, but all start with the tried-and-true = sign.
Let’s build a very basic formula without cell references. Pick any cell in your spreadsheet, and click into it. As you just learned, type an = sign. To keep it simple, let’s just add 2 + 2. Type 2, then add your operator, which is the + sign. Then, type another 2. That’s it! You’ve just written your very first formula:
Notice that your formula actually appears in two places – within the cell where you typed it, and then in the formula bar on Excel’s ribbon. The formula bar is the best place to make changes to formulas after you’ve typed them in. You can click into it, then move your cursor (or arrow keys) to navigate to a certain place in your formula to make changes.
When you’ve finished typing your formula, you’ll need to hit Enter on your keyboard. Excel will perform the calculations contained in the formula, and you’ll see that your cell now contains the solution value, 4. But the formula bar still lists the actual formula, not merely its solution.
Now, imagine that you have existing values on your spreadsheet that you want to use in a formula. For example, you want to multiply cell B1 by cell B2, and then by cell D3. Since the values are already typed in, there’s no need to retype them all in a separate cell to perform this math. Instead, you can write a formula with cell references.
To do so, click into any empty cell, then type =. But instead of typing anything in, click on cell B1. Notice how it appears in your formula, written as B1, not as its actual value.
Then, continue by typing your multiplication operator, which is the * symbol, found on the 8 key on your keyboard. Next, click cell B2, then type another *, and finally, click cell D3. You’ve built your second formula now, which is:
Once again, you can hit Enter, and Excel will do the math for you. You’ll see your solution: 150. As you can see, formulas spare you the trouble of retyping existing data!
Excel also has countless functions that you can use in formulas. Imagine that you have a list of ten numbers to add together. You don’t even have to click on them! Instead, you can use the SUM function. If you want to add the ten numbers in cells A1:A10, for example, you could build this quick formula:
Once again, formulas can take virtually infinite forms. But they always share the same framework, an = sign, and numbers, cell references, operators, and functions. They’re the best way to work in Excel.