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 david@acctadv.com 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...

Russia races to dodge sanctions by adapting law to FATCARussia is in a race against the clock to adapt its laws to the Foreign Account Tax Compliance Act (FATCA) and save its banks from financial sanctions, Peter Hobson of...
The following list highlights 10 apps that that may be of interest to you, your clients, or your clients' clients. They were featured during a session of AWEBLive!, the 12-hour CPE marathon, and presented by Gregory L....
I am a recent MS Accounting degree graduate and I am looking into a programming/IT related career. Anyone here have experience or know any accountants that diverted their careers into IT/Programming/System design, etc?...

Upcoming CPE Webinars

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.
May 1
This material focuses on the principles of accounting for non-profit organizations’ expenses. It will include discussions of functional expense categories, accounting for functional expenses and allocations of joint costs.
May 14
Save your relationship in those few situations where your performance falls far from perfect. It’s easy to want to brush service failures under the rug, hope no one notices and assume that somehow everything will be all right. In this workshop, Kristen Rampe, CPA will give you the tools to strengthen your professionalism in the face of the worst-case-scenario. Don’t let experience be your only teacher on these topics!