Improving the Integrity of Excel's SUM Function

By David Ringstrom, CPA
My unscientific observation is that the SUM function is the most widely used function within Excel spreadsheets. This function makes it easy to add up multiple cells at once without laboriously adding multiple cells together individually.
Taking things a step further, the AutoSum feature makes it easy to instantly add multiple totals into a spreadsheet. However, such ease of use actually introduces risk into Excel spreadsheets.
Let's say you need to total the values shown in Figure 1. Rather than manually add the SUM function to cells B4:G4 and H2:H4, you can use two keyboard shortcuts instead:
  • Click once on cell A1 and then press Ctrl-A. This will select the contiguous area, which we need to expand by one row and one column.
  • Hold down the Shift key, then tap the Down arrow, and then the Right arrow. At this point, your selection should look like Step 1 of Figure 1.
  • Press Alt-Equal Sign in Windows, or on a Mac, press Command-Shift-T. Alternatively, you can click the AutoSum icon, which looks like a Greek E. Any of these actions should add totals to row 4 and column H simultaneously. Do be sure to select the cells you wish to sum; otherwise, AutoSum will place a SUM function in the first numeric cell within the current region of your spreadsheet.

Figure 1: You can use AutoSum to add totals to the row below and column to the right if you expand the initial selection.
This technique added the necessary sums, but unfortunately, these formulas we so easily added are not future-proof, as shown in Figure 2. Here's how you can confirm this:
  • Insert a new row at row 4 so that the totals move down to row 5. Label cell A4 as Pears, and then enter 1000 in cells B4 through G4.
  • Notice how the totals in row 5 don't reflect the additional amount that was added for each month. 

Figure 2: The totals don't reflect the additional amount that has been added for each month. 
To correct this, we'd need to manually adjust the SUM formulas in row 5 to include rows 2 through 4, instead of rows 2 and 3. We'd then have to remember to carry out this action each time we add a new product line. Fortunately, a simple change to your spreadsheet design can liberate you from having to remember to adjust these formulas as shown in Figure 3:
  • Insert a blank row just above the total row, which in this case now appears on row 5. Change the row height to half of its normal height. An easy way to do so is to click on the row number on the worksheet frame and then drag the bottom of the row upward slightly. Next, adjust the SUM formulas in row 6 to be: =SUM(B1:B5).

Figure 3: Insert a blank row just above the total row to avoid adjusting the SUM formula each time a new item is added.
You'll notice that I included row 1 in the formula as well as the blank row 5. Going forward, if a user adds a new row, he or she will either enter it on or below row 2 or above row 5. Our SUM function will automatically encompass the additional row(s) without further interaction on our part. To improve the integrity of your spreadsheets, be sure your SUM formulas always sum one row above and one row below the actual numbers you're adding up.
Read more articles by David Ringstrom. 
About the author:

David H. Ringstrom, CPA heads up Accounting Advisors, Inc., an Atlanta-based software and database consulting firm providing training and consulting services nationwide. Contact David at or follow him on Twitter. David speaks at conferences about Microsoft Excel, and presents webcasts for several CPE providers, including AccountingWEB partner CPE Link.


You may like these other stories...

Event Date: May 29, 2014 In this presentation Excel expert David Ringstrom, CPA brings you up to speed on the Excel feature you should be using, but probably aren't. The Table feature offers the ability to both...
No field likes its buzzwords more than technology, and one of today's leading terms is "the cloud." But it's not just a matter of knowing what's fashionable. Accounting professionals who know how to use...
There is a growing trend of accountants moving away from traditional compliance work to more advisory work. Client demand is there, but it is up to the accountants to capitalize on that. What should accountants' roles be...

Upcoming CPE Webinars

Apr 22
Is everyone at your organization meeting your client service expectations? Let client service expert, Kristen Rampe, CPA help you establish a reputation of top-tier service in every facet of your firm during this one hour webinar.
Apr 24
In this session Excel expert David Ringstrom, CPA introduces you to a powerful but underutilized macro feature in Excel.
Apr 25
This material focuses on the principles of accounting for non-profit organizations' revenues. It will include discussions of revenue recognition for cash and non-cash contributions as well as other revenues commonly received by non-profit organizations.
Apr 30
During the second session of a four-part series on Individual Leadership, the focus will be on time management- a critical success factor for effective leadership. Each person has 24 hours of time to spend each day; the key is making wise investments and knowing what investments yield the greatest return.