How to Calculate Excel Averages for Data Sections Separated by Text
Question details
The user wants to calculate the average of multiple data sections that are grouped or separated by text labels without manually selecting the cell ranges for each individual section.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating statistical averages for grouped datasets within a single worksheet.
- Observed behavior
- The user seeks an automated, formula-based approach to extract the average for each section instead of using manual range selection, which is inefficient for large datasets.
Ensure your data is organized consistently, either with clear text labels in an adjacent column indicating the sections, or with uniform spacing and row counts between each data block.
Use the AVERAGEIFS Function (Recommended)
This method is best when each data row has a corresponding section label in an adjacent column.
The AVERAGEIFS function calculates the average of all cells in a range that meet one or more criteria. By referencing a column of text labels, you can dynamically calculate the average for each specific section.
Locate the column containing your text labels (e.g., Column A) and the column containing the numeric values you want to average (e.g., Column D).
In an empty cell (e.g., J2), type the specific text label for the section you want to average.
Select the cell next to your label (e.g., K2) and enter the formula: =AVERAGEIFS(D:D, A:A, J2). This tells Excel to average values in Column D where Column A matches the text in J2.
List your other text labels in cells J3, J4, etc., and drag the formula down from K2 to calculate the averages for all sections automatically.

Use a Dynamic INDIRECT Formula for Fixed-Length Sections
Use this approach if your sections lack text labels but consistently contain the exact same number of rows.
Easily Calculate Data Averages Using WPS Spreadsheet
WPS Spreadsheet fully supports advanced statistical formulas, including AVERAGEIFS and INDIRECT, allowing you to efficiently calculate averages for grouped datasets without manual selections.
- 1. Open your data file: Launch WPS Spreadsheet and open the workbook containing your grouped datasets.
- 2. Select the target cell: Click on the blank cell where you want the first section's average to be displayed.
- 3. Insert the formula: Type your =AVERAGEIFS or =AVERAGE(INDIRECT(...)) formula, referencing your data columns appropriately.
- 4. Use the fill handle: Press Enter, then drag the fill handle at the bottom-right of the cell to instantly apply the calculation to all remaining sections.

Frequently Asked Questions
Why does my formula return incorrect values when dragged down?
This usually happens because cell references shift as you drag. If you are using specific ranges rather than whole columns (e.g., A1:A50 instead of A:A), you must use absolute references by adding dollar signs (e.g., $A$1:$A$50) to lock the range.
What is the difference between AVERAGEIF and AVERAGEIFS?
AVERAGEIF calculates the average based on a single condition. AVERAGEIFS can evaluate multiple conditions across different ranges, making it more flexible for complex categorizations, though it can also be used for a single condition.
Can I use a PivotTable instead of formulas to find section averages?
Yes. If your data is in a proper tabular format with a dedicated column for section labels, highlighting your data, inserting a PivotTable, and changing the Values setting from 'Sum' to 'Average' is a highly efficient, formula-free alternative.




