• Buffer
  • Sharebar
  • Buffer
jethro's picture

Using the SUBTOTAL Function in Excel

The Subtotal function is commonly used when creating Subtotals on a table with the Data | Subtotals Menu command. However it can be just as easily used by writing the formula and has some powerful uses.
The syntax is SUBTOTAL(function_num,ref1,ref2,...)
The function numbers allow you to use any of the following functions in the subtotal:

(includes hidden values)

(ignores hidden values)



































The most common is of course the SUM function.
When and why should you use SUBTOTAL and not just the SUM function on its own.

The SUBTOTAL function has some powerful abilities that the commonly used SUM function doesn't. For example when summing a list of cells that contains hidden rows or columns the SUM function will include them. However the SUBTOTAL function only operates on visible cells. The values of the hidden cells are excluded from the total. This is especially useful when filtering a list if you want to see the total of the visible (or filtered) cells.
Note by default, if you have a filtered list of values and you double click the sum (sigma) icon on the toolbar after you select a cell below the bottom of the filtered range Excel will not use a SUM formula but automatically use a SUBTOTAL function.

The SUBTOTAL function ignores other subtotals within the range. So if you have several subtotals and a grand total, the grand total formula can be the subtotal of the entire range that includes the subtotals and it will ignore them.

Links to my other Articles about Subtotals including using outlining.



jethro's picture

Excel Tools for Business Half Price Sale

For a long time I have known Charley Kid and supported and sold his Excel Dashboard tools. I use many of his tools as reference material when designing and developing client reporting systems myself.

Right now Charley is having a Half Price Sale!

Here are the details:

Here’s where you can grab everything for half off:


I’m holding this special sale for two reasons. First, it's a great way to say THANK YOU to all the people who read my "Excel for Business" newsletter. And second, it helps the many subscribers who've asked for an inexpensive way to buy a lot of my Swipe Files for immediate download.

Try My Products for 50% Off and Get Two Unique Bonuses!

If the 50% discount isn’t enough to have you heading to my “half-off” web page, these two free gifts will surely do the trick:

jethro's picture

Pasting in Office 2013

This also applies to Office 2007 and 2010. Based on my original post Feb 2004 relating to Office 2003 and prior.

Most people know how to use copy and paste in Office. Or do they? Right click a selected item(s) and copy, then right click the destination and paste.

That is definitely the slow way. Keyboard people know about Ctrl+C and Ctrl+V for Copy and Paste. (or CTRL+Insert / Shift +Insert)

imageimageBut office has long had a Paste Special command that exposes a whole bunch more options for the pasting side of this command.

New Office, (2007, 2010, 2013) uses the Paste button in the ribbon to provide access (though there is still keyboard access with ALT+E+S).

Once you have something in the clipboard with the copy command, clicking the little arrow below Paste Icon in the ribbon gives you a lot more options. Each office application is slightly different  as to what you get.

Word has less options than Excel. Powerpoint and Outlook, Live Writer and Publisher etc. all use this feature differently. However each of them allow you to strip metadata (formatting etc.) from the actual text and just paste the text. This extremely useful when copying text from a web page, PDF file or some other heavily formatted document.

imageHovering your mouse over any of the icons will give you a tool tip identifying it as per the example on the right.

And clicking the Paste Special link at the bottom brings up the traditional dialog box.

Ill take you through the main ones for Excel.

  • Paste Special Formulas Use this when you want to copy a formula but don't want to change the editing on the target cell(s)
  • Paste Special Values Use this when you want to convert a selection (or single cell) from formulas or links to just the current calculated value. Full resolution of formulas to maximum decimal places will occur even if formatting doesn't show it. This is useful to cut links from external files, replace temporary formulas with actual results etc.
  • Paste Special Links Use this to quickly paste the link to an external spreadsheet by copying from that sheet and paste links into the target cell(s)
  • Paste Operation - Multiply, Add, Divide, Subtract These are very powerful tools. Try this:
    Find a selection of formulas (eg sums at the bottom of a range). Enter 0 (zero) in a blank cell then copy that cell.
    Select the range you want to alter and Paste Special Operation Multiply. (You may want to click Formulas as well so as to not change target cell(s) formatting).
    This will add to your existing formula *0 (and any required brackets) and the result will become zero. This can be used in all sorts of ways, - eg dividing numbers by 1,000 to change $ to $'000 etc.
  • Paste Special Transpose Use this to alter the orientation of a selection of cells. Copy a column and turn it into a row and vice versa.

You can also combine options from each section as per the example below.


jethro's picture

Using a slider to control values in a cell in Excel

This is a cool function that can assist you to make easy to use adjustable tables and charts.
Using the example of a mortgage, I used the mortgage template spreadsheet in Excel (under New Worksheet) to create a mortgage example. I then added a graph of the closing balance.

So now we have a nice looking chart that shows the closing balance of our mortgage over time.
Lets say we want to add the ability to easily change the additional payments and see graphically what that will do to our loan timeline.

From the Forms toolbar select the spin button. Then click and drag your mouse where you want it on your sheet . You can resize it later if necessary.

Now right click the control and select format control. Set it up as follows.

Now you can scroll up and down and as you do the monthly loan payments changes by $10 a time, and the loan balance adjusts accordingly. Obviously you can make these settings what ever you desire for any application where you need to rapidly change 1 (or more) variable and see the results.