Function Problems

How to Return and Sum Excel Values by Specific Month

Anum MushtaqAnum Mushtaq Oct 21, 2026 871 views

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.

How to Return and Sum Excel Values for a 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.
Before you start

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.

Solution 1Recommended

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.

1
Identify your data columns

Assume your Due Dates are located in column B and Purchase Order Amounts are in column C, starting from row 2.

2
Enter the IF and MONTH formula

Select the cell where you want the January amount to appear (e.g., D2) and enter the formula: =IF(MONTH(B2)=1,C2,"").

3
Apply and drag down

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 IF and MONTH Functions to Extract Monthly Values
Tip: To check for February instead of January, simply change the '1' in the formula to '2' (e.g., =IF(MONTH(B2)=2,C2,"")).
Process Data Easily with WPS Spreadsheet

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. 1. Open your dataset: Launch WPS Spreadsheet and open your purchase order workbook.
  2. 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. 3. Get instant results: Press Enter, and WPS Spreadsheet will instantly evaluate the dates and calculate the result flawlessly.
Fully compatible with Microsoft Excel formulas and .xlsx file formats.Free and lightweight alternative to Microsoft Office.Built-in data validation and formatting tools to easily manage date values.Cross-platform support to track your purchase orders on Windows, Mac, or mobile devices.
microsoft office alternative - wps office

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.