Function Problems

Calculate an Average from Another Workbook with AVERAGEIF in WPS Spreadsheets

Adam DavisAdam Davis Nov 13, 2026 870 views

Question details

The user needs to calculate an average in WPS Spreadsheets using AVERAGEIF where the criteria range is in the current workbook and the average range is in another workbook.

Product
WPS Spreadsheets
Device & OS
not provided
Scenario
The user wants to average values from a column in an external workbook when a corresponding column matches a criterion value in the current workbook.
Observed behavior
The average should be returned in the current workbook based on the external workbook data without manually copying or consolidating the data.
Before you start

Make sure both the current workbook and the external source workbook are open in WPS Spreadsheets, and confirm the workbook, worksheet, criteria range, and average range names match your data. If the external workbook is closed, use the full file path in the formula and enable external link updates when prompted.

Solution 1Recommended

Use AVERAGEIF with an External Workbook Reference in WPS Spreadsheets

Use this when you need to average values in another workbook based on a matching criterion without copying or consolidating the data.

This approach keeps your data in separate files and avoids manual consolidation, while still returning a live average that updates with the source workbook.

1
Open both workbooks

Launch WPS Spreadsheets and open the external source workbook as well as the workbook where you want the average result. Keep both files open so the external reference updates correctly.

2
Select the result cell and enter AVERAGEIF

Click the cell where the average should appear, type =AVERAGEIF(, and then build the formula with the external ranges, for example =AVERAGEIF('[dummy1.xlsx]Sheet1'!$B:$B,D5,'[dummy1.xlsx]Sheet1'!$BI:$BI).

3
Confirm and adjust ranges

Press Enter to calculate the average. Replace dummy1.xlsx, Sheet1, D5, and the column letters with your actual workbook, worksheet, criterion cell, and average column, and make sure both ranges have the same dimensions.

Use AVERAGEIF with an External Workbook Reference in WPS Spreadsheets
Formula returns the average: The AVERAGEIF result should appear in the selected cell. If WPS Spreadsheets prompts you to update external links when opening the workbook, choose Update to keep the result current.
WPS Spreadsheets

Calculate Cross-Workbook Averages with AVERAGEIF in WPS Spreadsheets

Open both workbooks in WPS Spreadsheets and enter an AVERAGEIF formula that references the external workbook. WPS Spreadsheets supports Excel-compatible formulas, so you can calculate the average directly in your current sheet without copying data.

  1. 1. Open WPS Spreadsheets and both workbooks: Launch WPS Spreadsheets, click Menu > Open, and open the source workbook and the destination workbook.
  2. 2. Select the destination cell: In the current workbook, click the cell where you want the average result and type =AVERAGEIF(.
  3. 3. Enter the external reference formula: Type the formula referencing the external workbook, such as =AVERAGEIF('[dummy1.xlsx]Sheet1'!$B:$B,D5,'[dummy1.xlsx]Sheet1'!$BI:$BI), replacing names and ranges as needed.
  4. 4. Press Enter and refresh links: Press Enter to calculate the result. If WPS Spreadsheets prompts you to update external links when opening the file, choose Update.
Uses Excel-compatible AVERAGEIF syntax, so existing formulas migrate without changes.Calculates averages directly from external .xlsx workbooks without copying data.Free, lightweight WPS Spreadsheets opens and saves Microsoft Excel .xlsx files reliably.Familiar ribbon interface reduces the learning curve when switching from Excel.
microsoft office alternative - wps office

Frequently Asked Questions

Can AVERAGEIF average values from a closed workbook in WPS Spreadsheets?

Yes, but you may need to include the full file path in the external reference and enable automatic update of external links. Keeping the source workbook open is the most reliable way to avoid manual link updates.

Why does my AVERAGEIF formula return #VALUE! or #DIV/0!?

Check that the criteria range and average range have the same dimensions, the workbook and sheet names are enclosed in single quotes when they contain spaces, and the external workbook is accessible to WPS Spreadsheets.

How do I reference an external workbook whose sheet name contains spaces?

Wrap the path, workbook, and sheet in single quotes, for example =AVERAGEIF('[Budget 2025.xlsx]Monthly Data'!$B:$B,D5,'[Budget 2025.xlsx]Monthly Data'!$C:$C).

Does WPS Spreadsheets support Excel AVERAGEIF functions across workbooks?

Yes, WPS Spreadsheets supports Excel-compatible AVERAGEIF formulas, including external workbook references, and can open and save .xlsx files without changing the formula structure.