Replace MAXIFS with MAX and IF for Monthly Dates in Excel
Question details
Calculate the maximum value for dates in a selected month in an Excel version that does not support MAXIFS.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Dates are stored in Sheet1 column A, values are in column CA, and Sheet2 cell G18 contains a date identifying the desired month.
- Observed behavior
- The user needs a formula that returns the maximum value in column CA for matching dates in the selected month.
Check that Sheet1 column A and Sheet2 cell G18 contain actual Excel dates and that column CA contains numeric values. Adjust the row limits in the formula to cover your data, keeping the date and value ranges the same size.
Use a MAX and IF array formula for the selected month
Use this formula in older Excel versions that do not have MAXIFS.
The formula checks dates from the first day of the month containing G18 up to, but not including, the first day of the next month. This also includes entries with times on the last day.
Click the cell where you want the monthly maximum to appear.
Type =MAX(IF('Sheet1'!A2:A1000>=EOMONTH('Sheet2'!G18,-1)+1,IF('Sheet1'!A2:A1000<EOMONTH('Sheet2'!G18,0)+1,'Sheet1'!CA2:CA1000))). Replace row 1000 with the last row of your data.
Press Ctrl+Shift+Enter in older Excel versions. Excel displays braces around the formula in the formula bar; do not type the braces yourself.

Calculate the monthly maximum in WPS Spreadsheets
Use the same MAX and IF array formula in WPS Spreadsheets to find the highest value for dates in a selected month.
- 1. Open the workbook: Open WPS Spreadsheets and select File > Open to load your workbook.
- 2. Check the source cells: On Sheet1, check the dates in column A and values in column CA. Enter a date from the desired month in Sheet2 cell G18.
- 3. Enter the formula: Click the result cell and enter =MAX(IF('Sheet1'!A2:A1000>=EOMONTH('Sheet2'!G18,-1)+1,IF('Sheet1'!A2:A1000<EOMONTH('Sheet2'!G18,0)+1,'Sheet1'!CA2:CA1000))). Adjust the row limits to fit your data.
- 4. Confirm and check: Confirm the formula with Ctrl+Shift+Enter if your WPS version requires array entry, then check the displayed maximum.

Frequently Asked Questions
Why does the formula use EOMONTH twice?
EOMONTH(G18,-1)+1 gives the first day of the selected month, while EOMONTH(G18,0)+1 gives the first day of the next month. The formula includes dates before that next-month boundary.
Do I need to press Ctrl+Shift+Enter?
In older Excel versions, confirm the formula with Ctrl+Shift+Enter so Excel evaluates it as an array formula. In newer versions with dynamic arrays, Enter is generally sufficient.
Will the formula include dates with times?
Yes. Using a less-than comparison with the first day of the next month includes timestamps throughout the last day of the selected month.
Why does the formula return 0?
The result may be 0 because there are no matching numeric values or because 0 is the maximum. Check the dates in Sheet1 column A, the values in column CA, and the month in Sheet2 cell G18.




