How to Return and Sum Excel Values by Specific Month
Question details
The user needs an Excel formula to return a purchase order amount if its due date falls in January, leaving the cell blank otherwise. They also want to calculate the total amount for that specific month.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Organizing and extracting monthly purchase order data and calculating totals from a master tracking spreadsheet.
- Observed behavior
- The goal is to automatically extract individual purchase order values matching a target month to individual cells, and use a separate formula to calculate the overall monthly sum.
Ensure your due date column is formatted as actual Dates in Excel. If the dates are stored as text, the MONTH and SUMIFS functions will not be able to evaluate them properly.
Use IF and MONTH Functions to Extract Monthly Values
This method checks the month of the date cell and returns the corresponding value if it matches the target month (e.g., January), otherwise leaving it blank.
The MONTH function extracts the month number (1 to 12) from a valid date. By nesting it inside an IF statement, you can conditionally display values based on the month.
Assume your Due Dates are located in column B and Purchase Order Amounts are in column C, starting from row 2.
Select the cell where you want the January amount to appear (e.g., D2) and enter the formula: =IF(MONTH(B2)=1,C2,"").
Press Enter to apply the formula. If the date in B2 is in January, C2's amount will display; otherwise, the cell stays blank. Click and drag the fill handle at the bottom right of cell D2 down the column to apply this formula to your entire dataset.

Use the SUMIFS Function to Calculate Monthly Totals
Instead of extracting individual amounts, use this solution to quickly sum all purchase orders that fall within a specific month's date range.
Calculate Monthly Totals Efficiently in WPS Spreadsheet
WPS Spreadsheet fully supports advanced logical and mathematical formulas like IF, MONTH, and SUMIFS. You can seamlessly manage your purchase orders, due dates, and financial data with its familiar, user-friendly interface.
- 1. Open your dataset: Launch WPS Spreadsheet and open your purchase order workbook.
- 2. Input the formula: Click on a blank cell and input your =IF(MONTH(B2)=1,C2,"") or =SUMIFS(...) formula exactly as you would in Excel.
- 3. Get instant results: Press Enter, and WPS Spreadsheet will instantly evaluate the dates and calculate the result flawlessly.

Frequently Asked Questions
Why does the MONTH function return a #VALUE! error?
This usually happens when the date in the reference cell is formatted as text rather than a valid date. Select your date column, right-click, choose 'Format Cells', and apply a valid Date format so the formula can read it.
How do I extract purchase order values for a specific year and month?
You can expand the IF statement using the AND function to check both the month and the year. For example: =IF(AND(MONTH(B2)=1, YEAR(B2)=2024), C2, "").
Can I view data for just one month without writing formulas?
Yes. You can select your data headers, go to the Data tab, and click 'Filter'. Click the dropdown arrow on the Due Date column header, uncheck 'Select All', and check only 'January' to hide all other rows.




