Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Calculating Statistical Values on Different-Sized Subsets of Data.
Written by Allen Wyatt (last updated January 28, 2023)
This tip applies to Excel 97, 2000, 2002, and 2003
Chris has a huge amount of data in a worksheet and he wants to analyze the data based on different groupings within it. For instance, he has data in cells A2:B36001, where row 1 contains the column headings Time and Signal. He wants to divide the data into groups consisting of some arbitrary number of sequential values, and then extract, for each group, a mean value for the Time, a mean value for the Signal, and a standard deviation for the Signal.
The easiest way to handle this type of requirement is to add a column that is used to indicate a group number for each row. Follow these steps:
With the group numbers set up, you are ready to do the analysis. There are a couple of ways you can do this. One way is to use the subtotaling capabilities of Excel. Select one of the cells in the data area and follow these steps:
Excel groups and subtotals the data, as directed. You can hide the detail (and only show the subtotals) by clicking on the small 2 (with the box around it) in the outline area at the left of the worksheet. If you later want to change what is calculated, or if you need to change the number of items in each group, just remove the subtotals (Data | Subtotals | Remove All) and repeat the above steps.
Another way to derive the statistics from your data is to use a PivotTable. Make sure that there are no subtotals in the data and select a cell within the data. Then follow these steps:
You now how the data desired. You may prefer a setup that shows only one row per category for your data. If so, simply click on the Data header and hold down the mouse button as you slowly move the mouse to the right. As you move the mouse pointer into the Total header area, a small icon near the mouse pointer shows a "change" in the layout. Release the mouse button and you will have only one row for each group in your data.
If you need to change the number of data items in each group, just go back to the data worksheet and change cell E1 to a different value. You can then return to the PivotTable, right click it, and choose Refresh Data.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2771) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Calculating Statistical Values on Different-Sized Subsets of Data.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
Excel provides several different ways that you can split apart the contents of a cell. One way it doesn't provide is to ...
Discover MoreIf you have a mixture of numbers and letters in a cell, you may be looking for a way to access and use the numeric ...
Discover MoreYour chosen occupation may require that you work with linear distances in feet and inches. Excel can do this, to a ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments