Function Problems

How to Calculate Excel Averages for Data Sections Separated by Text

Steven ParkerSteven Parker Oct 28, 2026 868 views

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.

How to Calculate Excel Averages for Data Sections Separated by Text
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.
Before you start

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.

Solution 1Recommended

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.

1
Identify your data columns

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).

2
Enter the target label

In an empty cell (e.g., J2), type the specific text label for the section you want to average.

3
Input the AVERAGEIFS formula

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.

4
Apply to other sections

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 the AVERAGEIFS Function (Recommended)
Tip for specific ranges: If you prefer not to reference entire columns (like D:D), ensure you use absolute references (like $D$2:$D$100) so the data range does not shift when you drag the formula down.

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. 1. Open your data file: Launch WPS Spreadsheet and open the workbook containing your grouped datasets.
  2. 2. Select the target cell: Click on the blank cell where you want the first section's average to be displayed.
  3. 3. Insert the formula: Type your =AVERAGEIFS or =AVERAGE(INDIRECT(...)) formula, referencing your data columns appropriately.
  4. 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.
100% compatible with Microsoft Excel formulas, functions, and file formats.Intuitive formula builder with syntax highlighting to prevent errors.Free and lightweight software tailored for seamless data analysis.
microsoft office alternative - wps office

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.