How to Find Most Common Value by Week in Excel
Question details
The user needs to extract the most frequently occurring data type grouped by week and calculate conditional weekly averages for specific data points.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Analyzing a weekly dataset to extract the most common categorical value for each week and calculating the average of numeric values based on a specific 'Won' condition.
- Observed behavior
- The user needs the correct nested array formula (INDEX, MATCH, MODE) to extract text frequencies without causing array spill errors in older versions of Excel.
Ensure your dataset is organized with clear column headers, and that the week numbers in your lookup criteria exactly match the week numbers formatted in your data source.
Use an Array Formula to Find the Most Common Text or Value
Combine INDEX, MODE, IF, and MATCH to evaluate non-numeric values and identify the most frequent item for a specific week.
The standard MODE function only works with numbers. By nesting MATCH inside MODE, you can evaluate text values by converting them to numeric positions within the array. The IF function restricts this evaluation to your specific target week.
In your target cell (e.g., J9), enter the formula: =INDEX($D$3:$D$200,MODE(IF($A$3:$A$200=J2,MATCH($D$3:$D$200,$D$3:$D$200,0)))) where column A contains the week, column D contains the values, and J2 is the current week.
If you are not using Microsoft 365 or Office 2021, you must press Ctrl+Shift+Enter to evaluate the formula correctly, which wraps the formula in curly braces.
Click and drag the fill handle from the bottom-right corner of the cell to the right to apply the formula for subsequent weekly headers.

Calculate Conditional Weekly Averages
Use the AVERAGEIFS function to calculate the average of values only when specific conditions, such as the week number and a specific status, are met.
Analyze Weekly Data Seamlessly with WPS Spreadsheet
WPS Spreadsheet provides robust support for advanced array formulas, dynamic arrays, and functions like INDEX, MATCH, MODE, and AVERAGEIFS. You can extract data frequencies and conditional averages flawlessly.
- 1. Open your dataset: Launch WPS Spreadsheet and open your existing Excel (.xlsx) workbook containing the weekly data.
- 2. Input the array formula: Select the target cell and input your nested INDEX, MODE, and MATCH array formula.
- 3. Evaluate and fill: Press Enter (or Ctrl+Shift+Enter) to calculate the result, then drag the fill handle to apply it across your weekly dashboard.

Frequently Asked Questions
Why does my MODE array formula return a #N/A error?
This error occurs if there are no duplicate values within the specified week's range. The MODE function requires at least two identical values to calculate a frequency.
Can I use MODE.SNGL instead of the classic MODE function?
Yes, MODE.SNGL operates exactly like the classic MODE function and is fully supported in modern spreadsheet applications for finding a single most common value.
How do I fix a #SPILL! error in my AVERAGEIFS formula?
A spill error occurs when a formula returns multiple values but lacks adjacent empty cells to output them. Ensure your AVERAGEIFS criteria arguments reference a single cell (like J2) rather than an entire array if you only want one output value.




