Reading Time: minutes remaining

How to Write a SUM Function in Excel

Jason Morrell

by Jason Morrell 
March 13, 2023

Select Dynamic field

The SUM function in Excel is the first one you learn. That's because one of the most common things you need to do in Excel is calculate a total.

In this post, you'll discover different ways to create a SUM function and different examples you can dissect.

1.  Example 1: How to write a basic SUM function in Excel

Consider this simple data:

Excel base data

To calculate the total of these numbers using a SUM function:

1.  Type =SUM(

2.  Select cells A1:A5 with the mouse (you can type the cell range but then you may get human error)

3.  Type the closing bracket and press Enter.

A basic SUM function in Excel

This calculates the total, 100.

The total using the SUM function in Excel

2. Anatomy of a SUM function

  • Every formula starts with '='. 
  • SUM tells Excel what to do, i.e. add up these numbers.
  • The cells or cell ranges inside the brackets tell Excel what to add up.

Here are some examples:

=SUM(A1,A2,A3)
=SUM(A1:A5, C1:C5)
=SUM(A1,C1:C5)

3. Example 2: How to generate SUM using AutoSum

The AutoSUM button is the beginner's best friend. You'll find it on the Home ribbon.

1.  Select the range of cells you wish to add up, or select the blank total cell.

2.  Click the AutoSUM button (you can also click the AutoSUM dropdown arrow then choose SUM but that's an extra click!)

Choosing SUM from the AutoSUM button

3.  Excel writes the SUM function for you. Press Enter to lock it in.

4. Example 3: How to SUM up summed data in Excel

If you already have data that has been summed, you can add up these values too. In the example below, every 3 months the quarterly column has been created to total the data. Columns D and H contain SUM functions for each row. 

To total up all the quarterly data, the SUM function refers to the cell ranges D2:D6 and H2:H6.

The SUM function to calculate the half-yearly grand total

5. What next?

I hope you found plenty of value in this post. I'd love to hear your biggest takeaway in the comments below together with any questions you may have.

Have a fantastic day.

Jason Morrell blog signature
About Jason Morrell

About the author

Jason Morrell


Jason loves to simplify the hard stuff, cut the fluff and share what actually works. Things that make a difference. Things that slash hours from your daily work tasks. He runs a software training business in Queensland, Australia, lives on the Gold Coast with his wife and 4 kids and often talks about himself in the third person!

SHARE

more from

Office Mastery logo
Read More
5 Excel Functions for Beginners: Simplify Your Formulas and Release the Magic
Read More
Excel Formulas for Beginners: Bring Your Spreadsheet to Life

JOIN THE DISCUSSION

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>