Total values in excel

Total the data in an Excel table

You can quickly total data in an Excel table by enabling the Total Row option, and then use one of several functions that are provided in a drop-down list for each table column. The Total Row default selections use the SUBTOTAL function, which allow you to include or ignore hidden table rows, however you can also use other functions.

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

  1. Click anywhere inside the table.

  2. Go to Table Tools > Design, and select the check box for Total Row.

    Total Row option in Design tab

  3. The Total Row is inserted at the bottom of your table.

    Excel table with the Total Row turned on

    Note: If you apply formulas to a total row, then toggle the total row off and on, Excel will remember your formulas. In the previous example we had already applied the SUM function to the total row. When you apply a total row for the first time, the cells will be empty.

  4. Select the column you want to total, then select an option from the drop-down list. In this case, we applied the SUM function to each column:

    Example of selecting a Total Row formula from the Total Row formula drop-down list

    You’ll see that Excel created the following formula: =SUBTOTAL(109,[Midwest]). This is a SUBTOTAL function for SUM, and it is also a Structured Reference formula, which is exclusive to Excel tables. Learn more about Using structured references with Excel tables.

    You can also apply a different function to the total value, by selecting the More Functions option, or writing your own.

    Note: If you want to copy a total row formula to an adjacent cell in the total row, drag the formula across using the fill handle. This will update the column references accordingly and display the correct value. If you copy and paste a formula in the total row, it will not update the column references as you copy across, and will result in inaccurate values.

You can quickly total data in an Excel table by enabling the Total Row option, and then use one of several functions that are provided in a drop-down list for each table column. The Total Row default selections use the SUBTOTAL function, which allow you to include or ignore hidden table rows, however you can also use other functions.

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

  1. Click anywhere inside the table.

  2. Go to Table > Total Row.

    Total Row option in Design tab

  3. The Total Row is inserted at the bottom of your table.

    Excel table with the Total Row turned on

    Note: If you apply formulas to a total row, then toggle the total row off and on, Excel will remember your formulas. In the previous example we had already applied the SUM function to the total row. When you apply a total row for the first time, the cells will be empty.

  4. Select the column you want to total, then select an option from the drop-down list. In this case, we applied the SUM function to each column:

    Example of selecting a Total Row formula from the Total Row formula drop-down list

    You’ll see that Excel created the following formula: =SUBTOTAL(109,[Midwest]). This is a SUBTOTAL function for SUM, and it is also a Structured Reference formula, which is exclusive to Excel tables. Learn more about Using structured references with Excel tables.

    You can also apply a different function to the total value, by selecting the More Functions option, or writing your own.

    Note: If you want to copy a total row formula to an adjacent cell in the total row, drag the formula across using the fill handle. This will update the column references accordingly and display the correct value. If you copy and paste a formula in the total row, it will not update the column references as you copy across, and will result in inaccurate values.

You can quickly total data in an Excel table by enabling the Toggle Total Row option.

  1. Click anywhere inside the table.

  2. Click the Table Design tab > Style Options > Total Row.

    The Total row is inserted at the bottom of your table.

Set the aggregate function for a Total Row cell

Note: This is one of several beta features, and currently only available to a portion of Office Insiders at this time. We’ll continue to optimize these features over the next several months. When they’re ready, we’ll release them to all Office Insiders, and Microsoft 365 subscribers.

The Totals Row lets you pick which aggregate function to use for each column.

Totals Row drop-down showing aggregate function options

  1. Click the cell in the Totals Row under the column you want to adjust, then click the drop-down that appears next to the cell.

  2. Select an aggregate function to use for the column. Note that you can click More Functions to see additional options.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

See Also

Overview of Excel tables

Video: Create an Excel table

Create or delete an Excel table

Format an Excel table

Resize a table by adding or removing rows and columns

Filter data in a range or table

Convert a table to a range

Using structured references with Excel tables

Subtotal and total fields in a PivotTable report

Subtotal and total fields in a PivotTable

Excel table compatibility issues

Export an Excel table to SharePoint

Need more help?

Usually, numbers are stored in rows of a single column, so getting the total of those columns is important. However, there are different ways of getting the total. As a beginner, it is important to know the concept of getting the column totals. This article will show you how to get excel totals of columns differently.

Table of contents
  • Total Column in Excel
    • How to Get Column Total in Excel (with Examples)
      • Example #1 – Get Temporary Excel Column Total in Single Click
      • Example #2 – Get Auto Column Total in Excel
      • Example #3 – Get Excel Column Total by Using SUM Function Manually
      • Example #4 – Get Excel Column Total by Using SUBTOTAL Function
    • Things to Remember
    • Recommended Articles

How to Get Column Total in Excel (with Examples)

Here we will show you how to get total columns in Excel with a few examples.

You can download this Column Total Excel Template here – Column Total Excel Template

Example #1 – Get Temporary Excel Column Total in Single Click

If you need a quick total of the column and see the total of any column, then this option will show a quick sum of numbers in the column.

  • For example, look at the below data in Excel.

Column Total Example 1

  • To get the total of this column “B,” select the entire column or the data range from B2 to B6. Then, we need to select the whole column and see the “Status Bar.”

Column Total Example 1-1

As we can see in the status barAs the name implies, the status bar displays the current status in the bottom right corner of Excel; it is a customizable bar that can be customized to meet the needs of the user.read more, we have a quick sum showing as 26,356.

  • Instead of selecting the entire column, we must choose the only data range and see the result.

Column Total Example 1-2

The total is the same, but the only difference is the formatting of numbers. In the previous case, we selected the entire column, and the formatting of numbers was not there. But this time, since we have chosen only the numbers range in the quick sum, too. So then, we can see the same formatting of the selected range.

Example #2 – Get Auto Column Total in Excel

The temporary total can be seen to make the calculations permanently visible in a cell. We can use the autosum option. For example, in the above data, we have data till the 6th row, so in the 7th row, we need the total of the above column numbers.

  • We must select the cell which is just below the last data cell.

Auto Column Total 1

  • Now press the “ALT + =” shortcut key to insert the AUTOSUM option.

Auto Column Total 1-1

  • As we can see above, it has automatically inserted the SUM function in excelThe SUM function in excel adds the numerical values in a range of cells. Being categorized under the Math and Trigonometry function, it is entered by typing “=SUM” followed by the values to be summed. The values supplied to the function can be numbers, cell references or ranges.read more upon pressing the shortcut key “ALT + =” and pressing the “Enter” key to get the column total.

Auto Column Total 1-2

Since we have selected only the data range, it has given us the same formatting of the selected cells.

  • However, there are certain limitations to this AUTOSUM function, especially when we work with a large number of cells. Now, look at the below data.

Auto Column Total 1-3

  • In the above data, we have data range till the 11th row. So in the 12th row, we need the column total, so select cell B12.

Auto Column Total 1-4

  • After that, we need to press the ALT + = sign shortcut key to insert the quick SUM function.

Auto Column Total 1-5

Look at the limitation of the AUTOSUM function. It has selected only four cells above. After the 4th cell, we have a blank cell, so the AUTOSUM shortcut thinks this will be the end of the data and returns only four cells summation.

In this case, this is a small sample size, but when the data is larger, it may go unnoticed. That is where we need to use the manual SUM function.

Example #3 – Get Excel Column Total by Using SUM Function Manually

  • We can open the SUM function in any cell other than the column of numbers.

Using SUM Function 1

  • For the SUM function, choose the entire column of “B.”

Using SUM Function 1-1

  • Then, close the bracket and press the “Enter” key to get the result.

Using SUM Function 1-2

So this will take the entire column into consideration and display results accordingly. Since the whole column has been selected, we need not worry about the missing cells.

Example #4 – Get Excel Column Total by Using SUBTOTAL Function

The SUBTOTAL function in excelThe SUBTOTAL excel function performs different arithmetic operations like average, product, sum, standard deviation, variance etc., on a defined range.read more is very powerful to show only displayed cell results.

  • We must open the SUBTOTAL function first.

Using Subtotal Function 1

  • Upon opening the SUBTOTAL function, we have many kinds of calculation types. From the list, choose the 9-SUM function.

Using Subtotal Function 1-1

  • Next, choose the above range of cells.

Using Subtotal Function 1-2

  • Then, close the bracket and press the “Enter key” to get the result.

Using Subtotal Function 1-3

We have got the total of the column. But the question is, if the SUM function returned the same, then what is the point of using SUBTOTAL.

  • The special thing is that SUBTOTAL displays the calculation only for visible cells. So, for example, apply a filter and choose only any of the three months.

Using Subtotal Function 1-4

  • We have chosen only the “Aug, Jun, and May” months. Then, click on “OK” and see the result.

Using Subtotal Function 1-5

The result of a SUBTOTAL function is limited to only visible cells, not the entire range of cells, so this is the specialty of the SUBTOTAL function.

Things to Remember

  • The AUTOSUM takes the only reference of non-empty cells, and at the finding of empty cells, it will stop its reference.
  • If any minus value is between, all those values will be deducted, and the result is the same as the mathematical rule.

Recommended Articles

This article has been a guide to Excel Column Total. We learn how to get a column total in Excel using the SUM and SUBTOTAL function and examples and a downloadable Excel template. You may learn more about Excel from the following articles: –

  • SUM Shortcut in Excel
  • How to Sum by Color in Excel?
  • SUMIF Function in Excel
  • Themes in Excel

Tables are one of the best features of Excel. While it is possible to use the standard cell referencing with a Table, they have their own referencing style called structured references. We have to think a little differently to create a running total in an Excel Table using structured references.

We will look at all the options in this post.

Download the example file

I recommend you download the example file for this post. Then you’ll be able to work along with examples and see the solution in action, plus the file will be helpful for future reference.

Download Icon
Download the file: 0075Running Totals in Excel Tables.zip

Watch the video

Watch the video on YouTube.

The example

All the scenarios in this post use the same Table. The goal is to:

  • Create a running total in the Running Total column
  • Ensure values calculate correctly when rows are added or deleted

Example data or running total

Normal cell references

We could use normal cell references in either the A1 or R1C1 style. For this, there are two common options (1) Cell above + value (2) Expanding range with mixed references.

Method #1: Cell above + value

The purpose of a Table is to use the same formula in each row of the column. Therefore, it is not possible to just use the cell above plus the value method.

Value above plus movement (addition)

The formula in Cell D2 is:

=D1+C2

The result of the formula is #VALUE!; Cell D1 is a text value, which cannot be added to a number using a basic calculation.

However, the SUM function ignores text values; therefore, by using SUM with a comma (known as the Union Operator), the text value will be calculated as a zero. This avoids the #VALUE! error.

Value above plus movement with SUM

The formula in Cell D2 is:

=SUM(D1,C2)

The result of this formula is a running total in each row of the Running Total column.

Rather than SUM, you could also use the N function. This returns zero if the cell reference within it is not a number; otherwise, it returns the number. For example, if Cell D2 contained the following formula, it would also create a running total.

=N(D1)+C2

However, both methods all fall short when rows are deleted. The screenshot below shows the result after Row 4 has been deleted.

Deleted row results in an error

As you can see by the #REF! error, this method does not work when rows are deleted. This does not meet the requirements we wanted.

Method #2: Expanding range with mixed references

There is another method we can take using standard ranges that uses mixed references.

Mixed References for Running Total

The formula in Cell D2 is:

=SUM($C$2:C2))

This method creates an expanding range for each row in the Table.

So, if you delete a row, it still works… perfect! Or is it? The problem comes when you add a new row of data to the bottom:

Mixed References - causes calculation error

There isn’t an obvious problem at the start. But, take a look at cell D17; what is the formula that has been automatically copied down? The formula references cell C18 (the last row of the Table), which is incorrect.

=SUM($C$2:C18)

Using this method, adding rows causes the formulas to expand to include the last row, which creates a calculation issue. Therefore, this isn’t a suitable method either.

Structured references

We really want to use structured references. After all, that is the whole point of using a Table.

Method #3: SUM with header row

In the previous section, we identified that SUM ignores text values. Given that the header row in a Table is always text and an absolute row reference (i.e., it doesn’t move when a cell is dragged down), we can create a running total with just the SUM function and structured references.

The formula in Cell D2 is:

=SUM(tblData[[#Headers],[Value]]:[@Value])

The result of this formula is a running total in each row.

  • tblData[[#Headers],[Value]] is the reference to the header row
  • [@Value] is the reference to the cell within the Value column contained on the same row
  • : (Colon) between two cell references creates a range

It is easier to see this method at work when we select a cell from the Running Total column.

SUM using header row creates an expanding range

Even though the entire range is not shown, a single range is created between the blue and red boxes.

We can delete or add to the Table, and it still works. AMAZING!

This appears to be the perfect method. However, I feel that using the header row makes this more of a visual solution than a data solution. By which I mean, in other parts of Excel, such as Power Query and Power Pivot, it’s not possible to reference the value in a header row. Therefore, this only works because the data is contained on an Excel worksheet.

I know this works, but conceptually, I feel we should look for another solution.

Method #4: INDEX function

All is not lost; there is another method.

The INDEX function makes it possible to reference any cell within a column.

=INDEX([Value],1)

Therefore, rather than using the column header cell, we can create an absolute reference by selecting the first cell in the column using the INDEX function.

Look at the solution below:

Running Total with SUM and INDEX

The formula in Cell D2 is:

=SUM(INDEX([Value],1):[@Value])
  • INDEX([Value],1) is always a reference to the first cell in the Value column
  • [@Value] is the reference to the cell within the Value column contained on the same row
  • : (Colon) between the two cell references creates a range

The result of this formula is a non-volatile running total in each row of the Running Total column. It calculates correctly even if rows are added or deleted.

Perfect! This is my preferred option.

Other options

There are other options using OFFSET and relative named ranges that we could use. However, I have discounted these because:

  • OFFSET is a volatile function that recalculates every time a cell changes in Excel, which can cause slow spreadsheet calculation times.
  • Relative named ranges are a technique to use when you’re stuck or backed into a corner. However, we have suitable techniques without resorting to this.

Running total with criteria

Let’s suggest that we don’t want a single running total, but the running total for each individual element in the Item column. Can our INDEX method handle that situation? You bet it can.

Method #5: INDEX with SUMIFS

We will use the same INDEX technique inside the SUMIFS function.

Running Total with Criteria

The formula in Cell D2 is:

=SUMIFS(INDEX([Value],1):[@Value],INDEX([Item],1):[@Item],[@Item])

You will notice this uses the same INDEX method as above to create a dynamic range inside both the sum_range and criteria_range1 arguments of the SUMIFS function.

Let’s check this works:

  • Alpha exists in Cells B2 (20) and B12 (80). The value in Cell C12 should therefore be 100, which it is. ✅
  • Alpha also exists in Cell B15 (60). The value in Cell C15 should be 160, which it is.✅

This method works when rows and added or deleted, precisely what we need. See, the INDEX method is very flexible.

Conclusion

There you have it, lots of options to achieve a running total in an Excel Table. But, there are also lots of pitfalls.

The methods using standard references cannot guarantee the correct values when adding or deleting rows, so these should be discounted.

Both structured referencing methods can be used with COUNT, COUNTIFS, MIN, MINIFS, MAX, MAXIFS, AVERAGE, and AVERAGEIFS.

The SUM + header row method works, but conceptually, I have an issue with referencing the header row in this way. Don’t get me wrong; if it were the only option, I would definitely use it.

The SUM + INDEX method is my preferred choice. It’s flexible and provides everything we need.


Headshot Round

About the author

Hey, I’m Mark, and I run Excel Off The Grid.

My parents tell me that at the age of 7 I declared I was going to become a qualified accountant. I was either psychic or had no imagination, as that is exactly what happened. However, it wasn’t until I was 35 that my journey really began.

In 2015, I started a new job, for which I was regularly working after 10pm. As a result, I rarely saw my children during the week. So, I started searching for the secrets to automating Excel. I discovered that by building a small number of simple tools, I could combine them together in different ways to automate nearly all my regular tasks. This meant I could work less hours (and I got pay raises!). Today, I teach these techniques to other professionals in our training program so they too can spend less time at work (and more time with their children and doing the things they love).


Do you need help adapting this post to your needs?

I’m guessing the examples in this post don’t exactly match your situation. We all use Excel differently, so it’s impossible to write a post that will meet everybody’s needs. By taking the time to understand the techniques and principles in this post (and elsewhere on this site), you should be able to adapt it to your needs.

But, if you’re still struggling you should:

  1. Read other blogs, or watch YouTube videos on the same topic. You will benefit much more by discovering your own solutions.
  2. Ask the ‘Excel Ninja’ in your office. It’s amazing what things other people know.
  3. Ask a question in a forum like Mr Excel, or the Microsoft Answers Community. Remember, the people on these forums are generally giving their time for free. So take care to craft your question, make sure it’s clear and concise.  List all the things you’ve tried, and provide screenshots, code segments and example workbooks.
  4. Use Excel Rescue, who are my consultancy partner. They help by providing solutions to smaller Excel problems.

What next?
Don’t go yet, there is plenty more to learn on Excel Off The Grid.  Check out the latest posts:

In this tutorial, you will learn how to add a Total Row to an Excel table. If you’re wondering what Total Rows and Excel Tables are, don’t worry. We’re going to tackle them one by one but before that, let’s get some background.

Excel 2007 came up with a feature called «Excel Tables«. Although Excel Table is an overly generic term, they provide some handy features to view and report data in tabular format. Apart from the countless features of the Excel table, they also give you an out-of-box ability to have a Total Row added to the bottom of your table.

The Total Row will not just present itself with a total figure, but the entire row can be used to summarize data by sum, average, count, minimum, maximum, and many other amazing aggregate functions. Before going any further into today’s topic, let’s address the elephant in the room – the Excel table.

How To Add Total Row In Excel Tables

What is an Excel Table?

If you are also under the common confusion that any table in an Excel file is an Excel table, let’s begin by clearing that up for you. A table made up of rows, columns, and data is a dataset. You will actually have to convert the dataset into an Excel table to be able to use its many features.

While a dataset will give the benefit of being organized, an Excel table can take that further, making the data dynamic (adjusting the range with added or deleted data), pre-styled, and easier to analyze & summarize through its several useful and convenient features. One of such convenient features of an Excel Table is the Total Row, which gives you the summary of calculations for each column with different data aggregation functions.

This helps you to have an instant overview of the data without much effort.  Now, let’s see how to convert your datasets into an Excel Table.

Converting Dataset into an Excel Table

Let’s suppose the plain dataset below is what you have to start with. Follow along to covert this dataset into an Excel Table:

How-to-add-total-row-excel-table-01

  • Select any cell in the table.
  • From the Home tab, in the Styles group, click Format as Table. You will see a menu from where you can select the style for the Excel Table.

How-to-add-total-row-excel-table-02

  • Alternatively, you can use the keyboard shortcut Ctrl + T to create an Excel Table. This option will automatically set the style to Table Style Medium 2, Blue, which can be changed later.
  • Upon selecting the style, you will get a Create Table dialog box asking the range of the table. This is why you need to select a cell in the table in Step 1, so Excel can estimate the range of the table.

How-to-add-total-row-excel-table-03

  • The marching-ants line denotes the range Excel guesses for the table. Make the adjustments here in the dialog box if Excel’s guess is not right.
  • If your table already contains headers, make sure the My table has headers checkbox is checked. Otherwise, this feature will assume no headers in the table and will create a new header row above the table.
  • Click OK, and your Excel Table is ready!

How-to-add-total-row-excel-table-04

Benefits of Excel Tables

Converting our dataset into an Excel table has the following benefits:

  • The biggest advantage of tables is that they are dynamic in nature, which means that they can expand as the new data is added or can shink when the data is deleted.
  • Converting the dataset into an Excel table gives you the option of sorting and filtering in every column of the table.
  • Provides a preset style that can be changed.
  • Opens up several handy features like calculated columns, structured references, etc.
  • One of these countless features is the ability to have Total Row for data summarization, and this is what we are going to see next.

Recommended Reading: Everything About Named Ranges in Excel

Adding a Total Row to an Excel Table

Adding a Total Row is as uncomplicated as making the table itself, and there are 2 easy ways of doing this. One from right-click context menu on the table and the other from the Design tab in the ribbon. Let’s walk you through both.

Method 1 – Adding Total Row from the Right-click Context Menu

  • Right-click any cell of the Excel table. This will display the right-click context menu.

Totals-Row-Option-Right-Click-Menu-05

  • In the menu, navigate to Table, and from the following sub-menu, select Totals Row.

Totals-Row-Added-To-The-Excel-Table-06

  • And there it is, the Total Row.

Method 2 – Adding Total Row from the Table Design Tab

  • Select any cell of the Excel table.

Total-Row-Option-On-The-Table-Design-Tab-07

  • Under the Table Design tab, in the Table Style Options, check the Total Row checkbox.

Totals-Row-Added-To-The-Excel-Table-06

  • Equally easy, there is the Total Row.

Pro Tip: The Total Row can be toggled in and out of display by selecting any cell in the Total Row and pressing Ctrl + Shift + T.

Now that you know how to add a Total Row, let’s discover its power.

Customize Totals with the SUBTOTAL function

Once you have added the Total Row, each cell in the row gets its own drop-down list. You can access the drop-down by clicking on the relevant cell, which will display a tiny arrow in a box like the ones in the header row. These drop-down lists provide control over what you would like to see in the Total Row.

Total-Row-DropDown-Subtotal-Options-08

Every option in this list is automatically calculated by the Excel SUBTOTAL function that ignores hidden rows and performs the required task (e.g., calculating and displaying the total or the average value of the column). This is further explained below.

Suppose you want to fetch the average unit price in the Total Row. To do this, inside the Total Row on the Unit Price column, select Avg from the menu.

Total-Row-DropDown-Subtotal-Average-Options-09

This will display the average unit price in the chosen column.

Total-Row-DropDown-Subtotal-Average-10

Notice above, with our result selected, the formula in the formula bar. With no work from us here, there is a SUBTOTAL function bringing our desired result for us. Excel automatically uses the SUBTOTAL function to perform the calculation chosen in the drop-down list of the Total Row. 101 in the arguments is a code given to the average calculation. Similarly, 109 is the code for Sum, 103 for Count, 104 for Max, and 105 for Min, etc. The next argument to the SUBTOTAL function is the column header.

Excel uses the SUBTOTAL function instead of the SUM, AVERAGE, or other functions as SUBTOTAL inherently ignores hidden rows and performs multiple calculations. While you can edit the SUBTOTAL function in the formula bar, you can also use the last option from the Total Row drop-down list, which is More Functions.

Total-Row-More-Functions-Option-11

Here you will have a vast choice of functions to choose from to add as a valuable part of your Total Row.

Total-Row-More-Functions-Option-12

In these ways, you can regulate what you want to see throughout the Total Row of your Excel Table.

And that’s totally the end. We quite hope to have given you an easy grasp of the Total Row and some understanding of how Excel tables work. There’s always more coming from planet Excel; we will keep you enlightened!

Adding up columns or rows of numbers is something most of us are required to do quite often. For example, if you store crucial data such as sales records or price lists in the cells of a single column, you may want to quickly know the total of that column. So it’s necessary to know how to sum a column in Excel.

There are several ways you can sum or total a column/row in Excel including, using a single click, the AutoSum feature, SUM function, filter feature, SUMIF function, and by converting a dataset into a table. In this article, we will see the different methods for adding up a column or row in Excel.

SUM a Column with One Click using Status Bar

The easiest and quickest way to calculate the total value of a column is to click on the letter of the column with the numbers and check the ‘Status’ bar at the bottom. Excel has a Status bar at the bottom of the Excel window, which displays various information about an Excel worksheet including average, count, and sum value of the selected cells.

Let us assume you have a table of data as shown below and you want to find the total of the prices in column B.

All you have to do is select the entire column with the numbers you want to sum (Column B) by clicking on the letter B at the top of the column and look at the Excel Status bar (next to the zoom control).

There you will see the total of the selected cells along with the average and count values.

You can also select data range B2 to B11 instead of the whole column and see the Status bar to know the total. You can also find the total of numbers in a row by selecting the row of values instead of a column.

The benefit of using this method is that it automatically ignores the cells with text values and only sums the numbers. As you can see above, when we selected the whole column B including cell B1 with a text title (Price), it only summed up the numbers in that column.


SUM a Column with AutoSum Function

Another quickest way to sum up a column in Excel is by using the AutoSum feature. AutoSum is a Microsoft Excel feature that allows you to quickly add up a range of cells (column or row) containing numbers/integers/decimals using the SUM function.

There is an ‘AutoSum’ command button on both the ‘Home’ and ‘Formula’ tab of the Excel ribbon that will insert the ‘SUM function’ in the selected cell when pressed.

Suppose you have the table of data as shown below and you want to sum up the numbers in column B. Select an empty cell right below the column or the right end of a row of data (to sum a row) you need to sum.

Then, select the ‘Formula’ tab and click on the ‘AutoSum’ button in the Function Library group. 

Or, go to the ‘Home’ tab and click on the ‘AutoSum’ button in the Editing group.

Either way, once you click the button, Excel will automatically insert the ‘=SUM()’ in the selected cell and highlights the range with your numbers (marching ants around the range). Check to see if the selected range is correct and if it’s not the correct range, you can change it by selecting another range. And the parameters of the function will auto-adjust according to that.

Then, just press Enter on your keyboard to see the sum of the entire column in the selected cell.

You can also invoke the AutoSum function using a keyboard shortcut.

To do that, select the cell, which is just below the last cell in the column for which you want the total, and use the below shortcut:

Alt+= (Press and hold the Alt key and press the equal sign = key

And it will automatically insert the SUM function and select the range for it. Then press Enter to total the column.

AutoSum lets you quickly sum a column or row with a single click or press of a keyboard shortcut.

However, there is a certain limitation to the AutoSum function, it would not detect and select the correct range in case there are any empty cells in the range or any cell that has a text value.

As you can see in the above example, cell B6 is empty. And when we entered the AutoSum function in cell B12, it only selects 5 cells above. It’s because the function perceives that cell B7 is the end of the data and returns only 5 cells for the total.

To fix this, you need to change the range by clicking-and-dragging with the mouse or type the correct cell references manually to highlight the whole column and press Enter. And, you will get the right result.

To avoid this, you can also enter the SUM function manually to calculate the sum.


SUM a Column by Entering the SUM Function Manually

Although the AutoSum command is quick and easy to use, sometimes, you may need to enter the SUM function manually to calculate the sum of a column or row in Excel. Especially, if you only want to add up some of the cells in your column or if your column contains any blanks cells or cells with a text value.

Also, if you want to show your sum value in any of the cells in the worksheet other than the cell right below the column or the cell after the row of numbers, you can use the SUM function. With the SUM function, you can calculate the sum or total of cells anywhere in the worksheet.

The Syntax of SUM Function:

=SUM(number1, [number2],...).
  • number1 (required) is the first numeric value to be added.
  • number 2 (optional) is the second additional numeric value to be added.

While number 1 is the required argument, you can sum up to a maximum of 255 additional arguments. The arguments can be the numbers you want to add up or cell references to the numbers.

Another benefit of using the SUM function manually is that you add up numbers in non-adjacent cells of a column or row as well as multiple columns or rows. Here’s how you use the SUM function manually:

First, select the cell where you want to see the total of a column or row anywhere on the worksheet. Next, start your formula by typing =SUM( in the cell.

Then, select the range of cells with the numbers you want to sum or type the cell references for the range you want to sum in the formula.

You can either click-and-drag with the mouse or hold the shift key and then use the arrow keys to select a range of cells. If you want to enter cell reference manually, then type the cell reference of the first cell of the range, followed by a colon, followed by the cell reference of the last cell of the range.

After you entered the arguments, close the bracket and press the Enter key to get the result.

As you can see, even though the column has an empty cell and a text value, the function gives you the sum of all the selected cells.

Summing Non-Continous Cells in a Column

Instead of summing up a range of continuous cells, you can also sum up non-continuous cells in a column. To select non-adjacent cells, hold the Ctrl key and click the cells you want to add up or type cell references manually and separate them with comms (,) in the formula.

This will display the sum of only the selected cells in the column.

Summing Multiple Columns

If you want the sum of multiple columns, select multiple columns with the mouse or enter the cell reference of the first in the range, followed by a colon, followed by the last cell reference of the range for the arguments of the function.

After you entered the arguments, close the bracket and press the Enter key to see the result.

Summing Non-Adjacent Columns

You can also sum non-adjacent columns using the SUM function. Here’s how:

Select any cell in the worksheet where you want to show the total of the non-adjacent columns. Then, start the formula by typing the function =SUM( in that cell. Next, select the first column range with the mouse or type the range reference manually.

Then, add a comma and select the next range or type the second range reference. You can add as many ranges as you want in this way and separate each of them with a comma (,).

After the arguments, close the bracket, and press Enter to get the result.

Summing Column using Named Range

If you have a large worksheet of data and you want to quickly calculate the total of numbers in a column, you can use named ranges in the SUM function to find the total. When you create Named Ranges, you can use these names instead of the cell references which makes it easy to refer to data sets in Excel. It is easy to use named range in the function instead of scrolling down hundreds of rows to select the range.

Another good thing about using Named range is that you can refer to a data set (range) in another worksheet in the SUM argument and get the sum value in the current worksheet.

To use a named range in a formula, first, you need to create one. Here’s how you create and use a named range in the SUM function.

First, select the range of cells (without headers) for which you want to create a Named Range. Then, head to the ‘Formulas’ tab and click on the ‘Define Name’ button in the Defined Names group.

In the New Name dialogue box, specify the name you want to give to the selected range in the ‘Name:’ field. In the ‘Scope:’ field, you can change the scope of the named range as the whole Workbook or a specific worksheet. The scope specifies whether the named range would be available to the entire workbook or only a specific sheet. Then, click the ‘OK’ button.

You can also change the reference of the range in the ‘Refers to’ field.

Alternatively, you can also name a range by using the ‘Name’ box. To do this, select the range, go to the ‘Name’ box on the left of the Formula bar (just above the letter A) and enter the name you wish to assign to the selected date range. Then, press Enter.

But when you create a named range using the Name box, it automatically sets the scope of the named range to the whole workbook.

Now, you can use the named range you created to quickly find the sum value.

To do this, select any empty cell anywhere on the workbook where you want to display the Sum result. And the type the SUM formula with the named range as is its arguments and press Enter:

=SUM(Prices)

In the above example, the formula in Sheet 4 refers to the column named ‘Prices’ in Sheet 2 to get the sum of a column.


Sum Only the Visible Cells in a Column Using SUBTOTAL Function

If you have filtered cells or hidden cells in a data set or column, using the SUM function to total a column is not ideal. Because the SUM function includes filtered or hidden cells in its calculation.

The below example shows what happens when you sum a column with hidden or filtered rows:

In the above table, we have filtered column B by prices that are less than 100. As a result, we have some filtered rows. You can notice that there are filtered/hidden rows in the table by the missing row numbers.

Now, when you sum the visible cells in column B using the SUM function, you should be getting ‘207’ as the sum value but instead, it shows ‘964’. Its because the SUM function also takes the filtered cells into account when calculating the sum.

This is why you cannot use the SUM function when filtered or hidden cells are involved.

If you don’t want the filtered/hidden cells to be included in the calculation when totaling a column and you only want to sum the visible cells, then you need to use the SUBTOTAL function.

SUBTOTAL Function

The SUBTOTAL is a powerful built-in function in Excel that allows you to perform various calculations (SUM, AVERAGE, COUNT, MIN, VARIANCE, and others) on a range of data and returns a total or an aggregate result of the column. This function only summarizes data in the visible cells while ignoring filtered or hidden rows. SUBTOTAL is a versatile function that can perform 11 different functions in visible cells of a column.

The Syntax of SUBTOTAL function:

=SUBTOTAL (function_num, ref1, [ref2], ...)

Arguments:

  • function_num (required) It is a function number that specifies which function to use for calculating the total. This argument can take any value from 1 to 11 or 101 to 111. Here, we need to sum the visible cells while ignoring filtered-out cells. For that, we need to use ‘9’.
  • ref1 (required) The first named range or reference that you want to subtotal.
  • ref2 (optional) – The second named range or reference that you want to subtotal. After the first reference, you can add up to 254 additional references.

Summing a Column using SUBTOTAL Function

If you want to sum visible cells and exclude filtered or hidden cells, then follow these steps to use the SUBTOTAL function to sum a column:

First, you need to filter your table. To do that, click on any cell within your data set. Then, navigate to the ‘Data’ tab and click the ‘Filter’ icon (funnel icon).

The arrows will appear next to column headers. Click on the arrow next to the column header with which you want to filter the table. Then, choose the filter option you wish to apply to your data. In the below example we want to filter column B with numbers less than 100.

In the Custom AutoFilter dialog box, we’re entering ‘100’ and clicking ‘OK’.

The numbers in the column are filtered by values less than 100.

Now, select the cell where you wish to show the sum value and start typing the SUBTOTAL function. Once you open the SUBTOTAL function and type the bracket, you would see a list of functions you can use in the formula. Click ‘9 – SUM’ in the list or type ‘9’ manually as the first argument.

Then, select the range of cells you wish to sum or type the range reference manually and close the bracket. Then, press Enter.

Now, you would get the sum (subtotal) of only the visible cells – ‘207’

Alternatively, you can also select the range (B2:B11) with the numbers that you wish to add up and click ‘AutoSum’ under the ‘Home’ or ‘Formulas’ tab.

It will automatically add the SUBTOTAL function at the end of the table and sums up the result.


Convert Your Data into an Excel Table to Get the Sum of Column

Another easy way that you can use to sum your column is by converting your spreadsheet data into an Excel table. By converting your data into a table, you can not only sum your column but can also perform many other functions or operations with your list.

If your data is not already in a table format, you need to convert it into an Excel table. Here’s how you convert your data into an Excel table:

First, select any cell within the data set that you want to convert to an Excel Table. Then, go to the ‘Insert’ tab and click the ‘Table’ icon

Or, you can press the shortcut Ctrl+T to convert the range of cells into an Excel Table.

In the Create Table dialog box, confirm the range and click ‘OK’. If your table has headers, leave the ‘My table has headers’ option checked.

This will convert your data set into an Excel Table.

Once, the table is ready, select any cell within the table. Then, navigate to the ‘Design’ tab which only appears when you select a cell in the table and check the box that says ‘Total Row’ under the ‘Table Style Options’ group.

Once you have checked the ‘Total Row’ option, a new row would immediately appear at the end of your table with values at the end of each column (as shown below).

And when you click on a cell in that new row, you would see a drop-down next to that cell from which you can apply a function to get total. Select the cell at the last row (new row) of the column you want to sum, click the drop-down next to it, and make sure the ‘SUM’ function is selected from the list.

You can also change the function to Average, Count, Min, Max, and others to see their respective values in the new row.


Sum a Column Based on a Criteria

All the previous methods showed you how to calculate the total of the entire column. But what if you want to sum only specific cells that meet criteria rather than all of the cells. Then, you have to use the SUMIF function instead of the SUM function.

The SUMIF function looks for a specific condition in a range of cells (column) and then sums up the values that meet the given condition (or values corresponding to the cells that meet the condition). You can sum values based on number condition, text condition, date condition, wildcards as well as based on empty and non-empty cells.

Syntax of SUMIF Function:

=SUMIF(range, criteria, [sum_range])

Arguments/Parameters:

  • range The range of cells where we look for the cells that meet the criteria.
  • criteria – The criteria that determine which cells need to be summed up. The criterion can be a number, text string, date, cell reference, expression, logical operator, wildcard character as well as other functions.
  • sum_range (optional) – It is the data range with values to sum if the corresponding range entry matches the condition. If this argument is not specified, then the ‘range’ is summed instead.

Suppose you have the below data set that contains sales data of each Rep from different regions and you only want to sum the sales amount from the ‘South’ region.

You can easily do that with the following formula:

=SUMIF(B2:B19,"South",C2:C19)

Select the cell where you want to display the result and type this formula. The above SUMIF formula looks for the value ‘South’ in column B2:B19 and adds up the corresponding Sales amount in column C2:C19. Then displays the result in cell E7.

You can also refer to the cell that contains text condition instead of directly using the text in the criteria argument:

=SUMIF(B2:B19,E6,C2:C19)

That’s it.

Like this post? Please share to your friends:
  • Total sum on excel
  • Total population of the word
  • Total pdf в word
  • Total number of english word
  • Total names in excel