Skip to main content

Entering Formula into an Excel Spreadsheet

 - What we want to do in our spreadsheet from the previous page is to add the daily columns. The four numbers for Monday need to be added up; the four numbers for Tuesday need to be added up; the four for Wednesday, and so on. The totals will go into the cells below, in our Day Totals row.
In a spreadsheet, you have to "tell" Excel which cells you want to add up. So for the Monday column, the 1 is in cell B4, the 7 is in cell B5, the 8 is in cell B6, and another 1 in cell B7. So we want the answer to B4 + B5 + B6 + B7.
To let Excel know that is the sum we want working out, do this:
  • Click in the cell where you want the answer to appear (This is cell B9 for us, the first of the Day Totals)
  • Now click inside the formula bar
  • Type in this: B4 + B5 + B6 + B7
  • Your spreadsheet should look like the one below
Entering formula into an Excel spreadsheet
Notice that the Name box top left says B9. This is the cell where we want the answer to appear.
When you have entered the formula in the formula bar, press the return key on your keyboard.
Your spreadsheet will look like the one below:
Entering a formula in a spreadsheet
Something has clearly gone wrong! We were expecting Excel to add up the numbers in those cells. Instead it has entered the cell references themselves: B4 + B5 + B6 + B7.
The problem is that Excel thinks you want text in the cell B9. When we entered B4 + B5 + B6 + B7 in the formula bar we didn't "tell" Excel to add up. So when we pressed the Return key, Excel thought it was just text.
To "tell" Excel to add up, you need an equals sign first. We'll also use the Sum function. The Sum function looks this:
=Sum( )
You put what you want to add up in between the two brackets. So we would need this:
=Sum( B4 + B5 + B6 + B7)

So go ahead and enter that in the formula bar. Before you press the Return key on your keyboard, your spreadsheet will look like this:
When your spreadsheet looks like the one above, press the Return key on your keyboard.

Finally, Excel understands what you want to do. It adds up the numbers in the cells you gave it, and puts the answer in cell B9. Your spreadsheet now looks like this one:
Notice what is happening in the Name box and the formula bar. The cell B9 is highlighted and displayed in the Name box top left. The formula bar is telling you what you have in cell B9. In this case it is the Sum( ) function. In between the brackets is what we want to add up: B4 + B5 + B6 + B7.
But suppose you had a very long column to add up. Suppose you wanted to add up the cells B4 to B44. Would you really have to enter B4 + B5 + B6 + B7 + B8 + B9 + B10 + B11, and so on right up to B44?
Fortunately not. There is a shorthand that Excels understands, when you want to add up consecutive cells. You use the colon. You type the first cell you want to add up, then type a colon. After the colon, you type the last cell that you want to add up. It would look like this:
=Sum(B4: B44)
The colon means: "Add up all the cells between the one on my left and the one on my right."

This page is getting a bit long now, so you can continue the lesson by clicking the link below.

Comments

Popular posts from this blog

Beginners PHP  -This is a complete and free PHP programming course for beginners. It's assumed that you already have some HTML skills. But you don't need to be a guru, by any means. If you need a refresher on HTML, then click the link for the Web Design course on the left of this page. Everything you need to get started with this PHP course is set out in section one below. Good luck! Home Page > PHP Section One - An Introduction to PHP 1. What is PHP and Why do I need it? 2. What you need to get started 3. Installing and testing Wampserver 4. Troubleshooting > PHP Two - Getting Started With Variables 1. What is a Variable? 2. Putting text into variables 3. Variables - some practice 4. More variable practice 5. Joining direct text and variable data 6. Adding up in PHP 7. Subtraction 8. Multiplication 9. Division 10. Floating point numbers > PHP Three - Conditional Logic 1. If Statements 2. Using If Statements 3....
Visual Basic .NET Contents Page   -This computer course is an introduction to Visual Basic.NET programming for beginners. This course assumes that you have no programming experience whatsoever. It's a lot easier than you think, and can be a very rewarding hobby! You don't need to buy any software for this course! You can use the new FREE Visual Basic Express Edition from Microsoft. To see which version you need, click below: Getting the free Visual Studio Express - Which version do I need? > VB .NET One - Getting Started   1. Getting started with VB.NET 2. Visual Basic .NET Forms 3. Adding Controls using the Toolbox Home Page 4. Adding a Textbox to the Form 5. Visual Basic .NET and Properties 6. The Text Property 7. Adding a splash of colour 8. Saving your work 9. Create a New Project >   VB .NET Two - Write your first .NET code   1. What is a Variable? 2. Add a coding button to the Form 3. Writing y...
The Excel SumIF Function  - Another useful Excel function is SumIF. This function is like CountIf, except it adds one more argument: SUMIF( range ,  criteria ,  sum_range ) Range and criteria are the same as with  CountIF  - the range of cells to search, and what you want Excel to look for. The Sum_Range is like range, but it searches a new range of cells. To clarify all that, here's what we'll use SumIF for. (Start a new spreadsheet for this.) Five people have ordered goods from us. Some have paid us, but some haven't. The five people are Elisa, Kelly, Steven, Euan, and Holly. We'll use SumIF to calculate how much in total has been paid to us, and how much is still owed. So in Column A, enter the names: In Column B enter how much each person owes: In Column C, enter TRUE or FALSE values. TRUE means they have paid up, and FALSE means they haven't: Add two more labels: Total Paid, and Still Owed. Your spreadsheet should look something li...