# [Excel Shortcut] Subtotal In An Instant (Windows & Mac)

Written by Kasper Langmann

In the world of data analysis, Microsoft Excel stands as a powerful tool that offers a plethora of functionalities to its users. One such feature is the Subtotal function, a versatile and often underutilized feature that can instantly streamline your data analysis process. This blog post will delve into the intricacies of the Subtotal function, providing you with a comprehensive guide on how to use this Excel shortcut on both Windows and Mac platforms.

## Understanding the Subtotal Function

The Subtotal function in Excel is a multi-purpose tool that allows users to perform different calculations like SUM, COUNT, AVERAGE, and more on a specified range of cells. This function is particularly useful when dealing with large datasets, as it can quickly provide you with a summary of your data without the need for complex formulas or manual calculations.

One of the unique features of the Subtotal function is its ability to ignore rows hidden by a filter, providing you with accurate results even when your data is filtered. This makes the Subtotal function an essential tool for anyone working with dynamic datasets where values can frequently change or be filtered.

### How the Subtotal Function Works

The Subtotal function works by taking two arguments: the function number and the range of cells. The function number determines the type of calculation to be performed, ranging from 1-11 for calculations that include hidden values, and 101-111 for calculations that exclude hidden values. For instance, a function number of 1 or 101 will perform the SUM function, while a function number of 2 or 102 will perform the COUNT function, and so on.

The range of cells, on the other hand, specifies the cells that the Subtotal function will calculate. This can be a single cell, a range of cells, or even multiple ranges of cells. The flexibility of the Subtotal function in handling different ranges of cells makes it a versatile tool for various data analysis tasks.

## Using the Subtotal Function in Excel

Now that we have a basic understanding of what the Subtotal function is and how it works, let’s delve into how to use this function in Excel. Whether you’re using a Windows or Mac platform, the process is essentially the same, with only minor differences in the keyboard shortcuts used.

Before we start, it’s important to note that your data should be sorted or filtered in a way that makes sense for the Subtotal function to work effectively. For instance, if you want to subtotal sales data by month, your data should be sorted by the month column.

### Steps to Use the Subtotal Function

1. First, select the range of cells you want to subtotal. This can be done by clicking and dragging your mouse over the cells, or by using the keyboard shortcut Ctrl+Shift+Arrow key (Windows) or Command+Shift+Arrow key (Mac).
2. Next, go to the Data tab on the Excel ribbon and click on the Subtotal button. This will open the Subtotal dialog box.
3. In the Subtotal dialog box, select the column you want to group by in the ‘At each change in’ dropdown. This will be the column that the Subtotal function will use to group your data.
4. Then, select the function you want to use in the ‘Use function’ dropdown. This can be any of the 11 functions available, depending on what calculation you want to perform.
5. Finally, select the column you want to calculate in the ‘Add subtotal to’ checkbox list. This will be the column that the Subtotal function will perform the calculation on.
6. Click OK to close the dialog box and apply the Subtotal function to your data.

And there you have it, a quick and easy way to use the Subtotal function in Excel. With this function, you can instantly subtotal your data without the need for complex formulas or manual calculations.

## Additional Tips and Tricks for Using the Subtotal Function

While the basic use of the Subtotal function is relatively straightforward, there are several tips and tricks that can help you maximize the potential of this function. These can help you streamline your data analysis process and make your work in Excel more efficient.

### Using the Subtotal Function with Filters

As mentioned earlier, one of the unique features of the Subtotal function is its ability to ignore rows hidden by a filter. This means that you can use the Subtotal function in conjunction with Excel’s filter feature to quickly analyze your data based on specific criteria.

To do this, simply apply a filter to your data before using the Subtotal function. The function will then only calculate the visible cells, giving you a subtotal based on your filter criteria. This can be particularly useful when dealing with large datasets, as it allows you to quickly get a summary of your data based on specific conditions.

### Using the Subtotal Function with Multiple Ranges

The Subtotal function also allows you to calculate multiple ranges of cells at once. This can be done by specifying multiple ranges in the range argument of the function. For instance, if you want to subtotal sales data for two different regions, you can specify both ranges in the function like so: SUBTOTAL(function_num, range1, range2).

This feature can be particularly useful when dealing with datasets that are split across multiple ranges or worksheets. With the Subtotal function, you can quickly get a summary of your data without the need to consolidate your data into a single range.

## Conclusion

The Subtotal function in Excel is a versatile and powerful tool that can greatly enhance your data analysis process. With its ability to perform different calculations on a specified range of cells, ignore rows hidden by a filter, and calculate multiple ranges at once, the Subtotal function is a must-know for anyone working with Excel.

Whether you’re a beginner just starting out with Excel, or a seasoned pro looking to streamline your workflow, understanding and utilizing the Subtotal function can significantly improve your efficiency and productivity. So why wait? Start using the Subtotal function today and see the difference it can make in your data analysis tasks.