Get instant live expert help with Excel or Google Sheets
“My Excelchat expert helped me in less than 20 minutes, saving me what would have been 5 hours of work!”

Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.

Excel SUBTOTAL Function

The Excel SUBTOTAL function is used to find out an aggregate for some given values. SUBTOTAL function can be used to return different results in the form of SUM, COUNT, MAX, AVERAGE, and other results. In short, SUBTOTAL function is used to get a subtotal from a list of values.

How to apply SUBTOTAL Function in Excel?

To perform various subtotal tasks we apply SUBTOTAL function in MS Excel. There are several tasks which SUBTOTAL can do and a comprehensive list of tasks with their function number is given below. To apply a SUBTOTAL function we simply have to insert a formula in a tab and SUBTOTAL function would return the result. See the example below for step by step guide on how to apply SUBTOTAL function.

Formula or Syntax:

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

Arguments:

  • function_num: It is the number pre-specified to tell SUBTOTAL what task to perform. There is a comprehensive list given below.
  • ref1 – A range to which the SUBTOTAL function to apply.
  • ref2 – (optional) It is an optional function for a named reference or range.

List of SUBTOTAL Functions:

Every SUBTOTAL function can be performed in two ways. It can either include the hidden values or exclude them. Below is a list of functions with their separate function numbers as well:

Example:

Here we will apply a very straightforward formula in a cell and learn how to apply SUBTOTAL function step by step,

  • In the example, we have a list of items from C4:C9 and their prices from D4:D9.

Figure 1. List of data

Now we want to obtain a SUBTOTAL of this list and calculate the number of fruits in the list and get the result in cell G5. We will go to cell G5 and insert the following formula.

=SUBTOTAL(3,C4:C9)

Figure 2. Applying SUBTOTAL formula

We have got the SUBTOTAL result in our cell G5.

Figure 3. The result of SUBTOTAL function

Notes:

  • When we apply function_num between 1-11, SUBTOTAL always includes the hidden values.
  • When we apply function_num between 101-111, SUBTOTAL always excludes the hidden values.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:
Solution examples
I need a formula to pop at the upper left corner of a spreadsheet. If I enter the month "January," I want the column number sum of January =SUM(AB11:AB75) from another section on the same excel page to pop right below the "January" cell, and not display the formula expression, but see the $100.
Solved by T. Q. in 40 mins
Can't add (SUM) in imported numbers from bank account
Solved by F. C. in 40 mins
I need a formula to combine D2 to D100 to add together a column of numbers, then take away the same amount on the same row when column E is filled. i.e. column D is a price of an item, so the formula must calculate the total, then when the item is sold an 'a' is marked next to the item in column E, the formula then must deduct this amount from the total
Solved by X. W. in 20 mins
I would like to have a diagram in a new sheet, where the horizontal axis is the days, as they are in column DX. Each day shall show the sum of all unique leads of that day, and I would like to be able to check via a box of checkboxes, which facilities are shown, the facilities are in column BC.
Solved by I. A. in 45 mins
I am working on a cash flow projection. Part of the projection includes sales commissions. Our sales guys earn a monthly draw and then commission on sales after a certain amount. For example they may earn a monthly salary of 12,500 and earn additional commission after their commission equals $150,000. What I need excel to do is sum a column if the values in the preceeding columns are greater than $150,000. I've tried using the sumif and the if function in excel and it's not working correctly either way. Any suggestions?
Solved by G. W. in 19 mins

Leave a Comment

avatar

Subscribe to Excelchat.co

Get updates on helpful Excel topics

Subscribe to Excelchat.co

Did this post not answer your question?
Get a solution from connecting with the expert

Another blog reader asked this question today on Excelchat:

Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.
Trusted by people who work at
Amazon.com, Inc
Facebook, Inc
Accenture PLC
Siemens AG
Macy's
The Allstate Corporation
United Parcel Service
Dell Inc