Get help

Help center

Guides and answers

Contact support

Write to our team

Sign in to

Workflows

Build processes with your team

Automations

Connect files and automate tasks

One system, four parts

AI agents

Virtual Employees that work 24/7

Automations

Connect files and automate tasks

Workflows

Build processes with your team

Data Space

Trusted data sharing and control

Solutions by department

Finance

Reports, budgets, and reconciliations

Inventory and manufacturing

Stock, orders, and production in one view

HR

Timesheets, attendance, and reviews

Project management

Status and workload across projects

Sales and CRM

Leads and deals kept up to date

Education

Student records and school data

Finance

Turn manual finance work into reports that update themselves.

What Finance teams automate

  • Track payables and receivables
  • Build cash flow statements
  • Compare budget against actuals

Inventory and manufacturing

See stock levels and automate ordering.

What inventory and manufacturing teams automate

  • Track inventory across multiple sites
  • Connect sales, purchasing, and warehouse data
  • Link a barcode scanner to your sheet

HR

Run recruitment, attendance, and OKR tracking from your sheets.

What HR teams automate

  • Track recruitment and onboarding
  • Record team OKRs and results
  • Track check-ins, check-outs, and leave

Project management

Assign tasks and track hours without manual updates.

What project teams automate

  • Assign tasks and track status changes
  • Estimate effort and log hours worked
  • Track milestones across projects

Sales and CRM

Track leads and sales performance with automated reports.

What sales teams automate

  • Track and convert leads
  • Set sales goals and track team metrics
  • Monitor sales KPIs on dashboards

Education

Automate attendance, grades, and school purchasing.

What schools automate

  • Track attendance and notify parents
  • Record and compare class grades
  • Track inventory lent to students and staff

Find a use case

By department

How each team uses Sheetgo

By industry

How each industry uses Sheetgo

By company size

Small, medium-sized, or large

Learn

Blog

Guides and product news

Customer stories

How teams like yours use Sheetgo

Help center

Guides and answers

Why Sheetgo

Compare

How Sheetgo compares with other tools

Security

How we protect your data

Trust center

Our compliance details

Sign in to

Workflows

Build processes with your team

Automations

Connect files and automate tasks

One system, four parts

AI agents

Virtual Employees that work 24/7

Automations

Connect files and automate tasks

Workflows

Build processes with your team

Data Space

Trusted data sharing and control

Solutions by department

Finance

Reports, budgets, and reconciliations

Inventory and manufacturing

Stock, orders, and production in one view

HR

Timesheets, attendance, and reviews

Project management

Status and workload across projects

Sales and CRM

Leads and deals kept up to date

Education

Student records and school data

Find a use case

By department

How each team uses Sheetgo

By industry

How each industry uses Sheetgo

By company size

Small, medium-sized, or large

Get started

Templates

Ready-made workflows to start from

Learn

Blog

Guides and product news

Customer stories

How teams like yours use Sheetgo

Help center

Guides and answers

Why Sheetgo

Compare

How Sheetgo compares with other tools

Security

How we protect your data

Trust center

Our compliance details

Help center

Guides and answers

Contact support

Write to our team

Workflows

Build processes with your team

Automations

Connect files and automate tasks

How to aggregate data in Excel (multiple ways)

Excel is usually the preferred option for data storage and transformation tasks, especially if you work with large datasets. If your daily routine involves analyzing or interpreting thousands of rows, then it can become overwhelming or, even worse, completely inefficient. If you work in Finance or Sales, it’s likely that you’ll need to identify patterns to make predictions. This will require aggregating cell ranges or summarizing key data while keeping errors or broken formulas to a minimum.

In this article, you’ll learn how to aggregate data in Excel using the AGGREGATE function by getting an in-depth explanation of the AGGREGATE function; then, a detailed view of the formula syntax; and a step-by-step illustration of how to calculate the sum and average of data using the AGGREGATE formula and Excel Power Query.

What is the AGGREGATE formula in Excel?

Excel introduced the AGGREGATE function in the 2010 version. You can use this function to aggregate data in Excel for different purposes, including sums or averages, while having the option to ignore hidden rows and errors.

AGGREGATE formula syntax

The Excel AGGREGATE function can be expressed in two different ways, as a reference formula or an array. The great thing is you don’t need to worry about which one to use since Excel will select the right one for you automatically based on your input parameters.

=AGGREGATE(function_num, options, ref1, [ref2], …)

or

=AGGREGATE(function_num, options, array, [k])

Below, you’ll find what each parameter stands for:

  • function_num: This required parameter is expressed as a number, 1 to 19, and specifies the aggregate function to perform.
  • options: Another required parameter, expressed as a number from 0 to 7, to identify the range to ignore by the function.
  • ref1: This required parameter references the cell range that the function applies to.
  • [ref2]: This is an optional parameter, and it expresses any additional cells. Here you can include up to 253 ranges, each divided by a comma (,).
  • array: This refers to an array of values or an array formula to which the function is applied.
  • [k]: This parameter is only required by certain functions, including LARGE(array, k), SMALL(array, k), PERCENTILE.INC(array, k), PERCENTILE.EXC(array, k), QUARTILE.EXC(array, quart).

How to aggregate data in Excel?

You can aggregate data in Excel by using the reference formula or the array formula, as shown above. Here, you’ll learn how to use the reference form of the AGGREGATE formula to average data in Excel.

How to use the AGGREGATE function in Excel?

AGGREGATE functions can help you perform calculations to return a single value as a summary. The five most common functions are SUM, AVERAGE, COUNT, MAX, and MIN which are also easily accessible through an “AutoSum” button placed in the Home tab. However, these functions are basic and don’t allow for more complex criteria. This is how you can use the AGGREGATE function in Excel to get accurate results.

Let’s say you need to find the average loan amount given to your clients. However, you’d like to ignore the errors included in the cell range. Applying the AVERAGE function to this range would result in an error. However, let’s see what happens if we combine it with AGGREGATE.

1. Type in "=AGGREGATE(" in the first empty cell following your dataset. As you can see, Excel automatically prompts the two types of AGGREGATE formulae. Here, we will follow the reference syntax, since AVERAGE is one of the functions (1 to 13) that use it.

How to aggregate data in Excel — =AGGREGATE( typed next to a loan dataset, with both formula forms in the tooltip

2. Click on the function_num parameter, and Excel will display the list of functions to choose from.

How to aggregate data in Excel — AGGREGATE tooltip with the function_num argument highlighted

3. Since we want to calculate the AVERAGE, we need to select “1”. Once you finish, type in the comma to proceed to the next parameter.

How to aggregate data in Excel — =AGGREGATE(1, entered to pick AVERAGE as the function

4. Click on the options parameter and select “6” to ignore errors. Type in the comma to include the next parameter.

How to aggregate data in Excel — =AGGREGATE(1,6, with option 6 to ignore error values

5. Click on the ref1 parameter and select the range you’d like to calculate with your mouse. Enter the closing parenthesis to complete the formula and press “Enter”.

How to aggregate data in Excel — =AGGREGATE(1,6,F2:F43) with the LOAN AMOUNT column selected

6. As you can see, the AGGREGATE function has returned the AVERAGE of the values in the selected cell range without any errors.

How to aggregate data in Excel — AGGREGATE returning an average loan amount of 4410.36

Now that you’ve seen how easy it is to aggregate data using the AGGREGATE function to average values, let’s see how you can aggregate data in Power Query.

How to aggregate data using Excel Power Query?

If you need to summarize data from various sources, using Excel Power Query is the best option. Here, you’ll see how to include a “New Source” in Power Query and apply aggregate features to perform basic calculations such as SUM or AVERAGE.

1. Go to Data > Get Data > From Table/Range.

Aggregate data in Excel with Power Query — Data tab with Get Data and From Table/Range on the ribbon

2. You can select this option directly from the ribbon group, as shown below.

Aggregate data in Excel with Power Query — From Table/Range selected in the Get and Transform Data group

3. Excel will prompt the “Create Table” settings box to confirm the range you’d like to edit in Power Query.

Aggregate data in Excel with Power Query — Create Table dialog confirming the data range and headers

4. In the Power Query Editor, go to Home > New Source > File to add data from a different file.

Aggregate data in Excel with Power Query — Power Query Editor with the New Source and File menu open

5. Select the file to import data from and then click on “Import”.

Aggregate data in Excel with Power Query — Import Data window with the CLIENTS 2022 workbook selected

6. In the “Navigator” window, you’ll find a folder containing the new data to import into Power Query. Select the new table source and click “OK”.

Aggregate data in Excel with Power Query — Navigator window previewing the data table from CLIENTS 2022

7. Go to Transform > Group By.

Aggregate data in Excel with Power Query — Group By dialog grouping by LOAN AMOUNT with Count Rows

8. This will prompt a new window where you can specify the columns you’d like to group. To use the aggregate features click on the “Advanced” option.

Aggregate data in Excel with Power Query — Group By dialog with the Advanced option selected

9. Select the first column to group from the drop-down menu. Here, I’ve selected “LOAN AMOUNT”. If you need to include more columns, click on the “Add grouping” button below.

Aggregate data in Excel with Power Query — SUM column set to Sum of LOAN AMOUNT in the Group By dialog

10. To aggregate data according to your preferred calculation, simply type in a name in the “New column name”, select the “Operation”, and then the “Column” containing the values you’d like to calculate. Click on the “Add aggregation” button to include as many operations as needed.

Aggregate data in Excel with Power Query — second AVG aggregation with the column list open

11. Once you’ve selected your criteria to aggregate, click “OK”.

Aggregate data in Excel with Power Query — SUM and AVG aggregations on LOAN AMOUNT and INTEREST RATE

12. As shown below, Power Query automatically outputs the result from all aggregate functions you selected. Moreover, in the “Query Settings” right-side pane, it lists all the actions, i.e., queries, taken to arrive at this result.

Aggregate data in Excel with Power Query — grouped table with LOAN AMOUNT, SUM, and AVG columns

Conclusion

One of the most attractive aspects of Excel is the wide range of formulae and calculation features to help users transform and process large amounts of data quickly and easily. Although using Power Query may require more advanced knowledge in Excel, the basic AGGREGATE functions already unlock powerful operations that could not be done manually.

You should now feel comfortable with the AGGREGATE formula in Excel and the basic functions. What’s more, you should now be able to apply the formula depending on what you need to calculate.

If you would like to learn more about the data processing and transformation features Excel has to offer, read through any of the following articles:

AGGREGATE isn’t the only way to summarize a range. For totals that depend on a condition, try SUMIF in Excel. To group and total a large table without writing formulas, build a pivot table in Excel. And if the numbers you need sit in several workbooks, you can consolidate Excel files automatically with Sheetgo, an AI-powered data automation platform that keeps the combined data up to date. Try Sheetgo for free with your own files.

You may also like…

How to lock cells in Excel — Excel logo next to a green padlock on a mint background

How to lock cells in Excel? (cells, sheets & formulas)

Learn how to lock cells in Excel to stop accidental edits, plus how to protect a sheet and lock formulas, with steps for Windows and Mac.

Excel version control — stacked XLS file icon in teal on a dark navy background

The beginner’s guide to Excel version control

Discover what Excel version control is, the version control features Excel has to offer, and how to use them to share, merge, and review Excel changes.

How to remove password protection from Excel — Excel icon next to a padlock with a masked password on a light blue background

How to remove a password from Excel (multiple methods)

Learn how to remove password protection from Excel: unlock a file or a sheet when you know the password, and what to try if you’ve forgotten it.