My Newest Book
Excel 2003 Study Guide

get it at Amazon.


View sample pages here


FROM WILEY: Download sample Excel files to accompany the book.
Instructors may download tests, slides, outlines, etc. HERE


ABC
Free
Newsletter
See my free ezine

Linda's Ebooks
Ebooks on Access, Excel, Outlook, PowerPoint, Publisher, and Word

Linda's CD

The Newbie Club
Read Linda's Free Office Tips at The Newbie Club

Online classes
at Eclectic Academy
 Instructor led online courses at Eclectic Academy

FrontLook
Add-ins
& Screen Capture

Read Linda's review of FrontLook's add-ins and Screen Capture Program

WinBackup
SpeedUpMyPC
WinTasks5Pro

great Windows utilities

 

 

Linda's Computer Stop Home Page

Subtotals in Excel
by Linda Johnson, MOS

reprinted with permission from TechTrax     

TechTrax Seal

In this article, let’s look at the Subtotal feature in Excel. This allows you to subtotal one column of numbers, based on a change in another column.  For this exercise, enter the following data into a new blank workbook.

data used for this exercise

Let's say, looking at our data, that we want to get totals for each of our three departments.  This is quick and easy using the Subtotals feature.  It's exactly what it's made for.  No need to write formulas to do this.  Here's what you do:

First, make sure your data is sorted by the Dept. column.  In order for subtotals to work, you must ALWAYS sort by the column that will reflect the categories of your subtotals.  Don’t forget this step or you will get multiple entries for each department. In this case, these department names will be what we are showing subtotals for, so our data must be sorted on these names.

Now, click anywhere inside your data and go to the Data menu and choose "Subtotals".  Select to sum the Totals column at every change in the Dept column.  Make sure your choices look like mine below and click OK.

Subtotals dialog box

Now your data looks like mine does below, with all of your Subtotals in bold and a grand total at the end.  Notice the - and + signs to the left of your data where you can expand and collapse your subtotals to reveal just the subtotals for all or any one department.  Try expanding and collapsing the different rows to see all the different types of reports you could now print for this data.

How data looks with subtotals applied

Try applying subtotals that use formulas other than "Sum" to produce averages or counts of items instead of totals and see how versatile this little feature is.  Notice the myriad of different types of reports you can now quickly print off.  For example, you could remove the Subtotals by simply going back to Data>Subtotals and clicking on the Remove All button; then try sorting your data by the "Raise?" column and choosing to Count the entries in the Last Name column at each change in the Raise column. This would give you a count of the employees who got a raise and the employees who didn’t.

TIP: Let’s say you want to create a new spreadsheet or new workbook that shows just the totals for each department. Click on all of the minus signs to collapse everything so you only see the department subtotals. Then go to the Edit menu and choose "Go To" (or simply hit the F5 key). In the "Go To" box, click on the button at the bottom that says "Special…", then put a tick in the option button that says "Visible Cells Only", then click OK. Now all of the visible cells are selected (and none of the hidden ones in the collapsed rows). Simply copy that (ctrl+C) and paste it into a new worksheet or workbook and you have a separate totals report which no longer includes the individual totals, but only the subtotals for the departments and the grand total. This is handy when you want to send a totals report to someone and not include the individual amounts, which might include confidential information.

Hope you enjoyed this article. Excel has many automatic features like this that eliminate the need for elaborate formulas.

Linda Johnson

Search  

SITE MAP

HOME

ADVERTISE

About
Linda
See my résumé

Read my blog :-)

Contact
Linda

Support

Articles written
by Linda

Testimonials

Free
MS Office
Tips &
Tutorials
choose one

FREE Tips & Tutorials

WINDOWS

IE/OE

HARDWARE

REGISTRY

DOWNLOADS
SIDE by SIDE
Fun LINKS

 

Join
Linda's
Free
MS Office
Group
Join and help others as well as yourself

 

ArrayFormulas
ConditionalFormat
Data Filters
ExcelShortcuts
Easter Eggs
FormatCells
NamedRanges
PasteSpecial
Personal.xls
Page Breaks
Car Loans
IF Statement
Intro to IFs
IFs Pt. II
Subtotals
Vlookup

Privacy Policy, Disclaimer, and Legal Stuff

This site was last updated on Friday, March 21, 2008 . copyright © 2000 - 2008, Linda F. Johnson, Linda's Computer Stop. All rights reserved.

SEARCH THIS SITE