Use IF and NETWORKDAYS to Calculate Working Days in Excel
Question details
Calculate working days between two dates only when a status field is Won; otherwise, return a blank result.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet has a status field and start and end dates for each record.
- Observed behavior
- The desired result is a working-day count for Won records and a blank cell for other statuses.
Identify the status, start-date, and end-date cells, and make sure the dates are stored as valid Excel dates. The examples use A2 for the status, D2 for the start date, and E2 for the end date.
Use IF and NETWORKDAYS for a Single Status Cell
Use this formula when one cell contains the status for each record.
Select the result cell for row 2 and enter =IF(A2="Won",NETWORKDAYS(D2,E2),""). Replace A2, D2, and E2 with your status and date cells if needed.
Press Enter, then drag the result cell's fill handle down to copy the formula to other records.

Check Multiple Status Cells with COUNTIF
Use this option when the status may appear in a range of cells in the same row.
Calculate Won Working Days in WPS Spreadsheets
Use IF and NETWORKDAYS in WPS Spreadsheets to count working days for Won records and leave other results blank.
- 1. Open the worksheet: Open WPS Spreadsheets and select File > Open to choose your workbook.
- 2. Select a result cell: Click the cell where you want the working-day count for the first record.
- 3. Enter the formula: Type =IF(A2="Won",NETWORKDAYS(D2,E2),"") and adjust the references to your status and date cells.
- 4. Fill the remaining rows: Press Enter, then drag the cell's fill handle down to calculate results for the other records.

Frequently Asked Questions
How do I exclude holidays from the working-day count?
List the holiday dates in a range such as H2:H10, then use =IF(A2="Won",NETWORKDAYS(D2,E2,$H$2:$H$10),"").
Can I use a different weekend schedule?
Yes. Use NETWORKDAYS.INTL inside IF. For a Friday–Saturday weekend, enter =IF(A2="Won",NETWORKDAYS.INTL(D2,E2,"0000110"),"").
How do I match a status that contains Won along with other text?
Use a wildcard with COUNTIF, for example =IF(COUNTIF(A2,"*Won*")>0,NETWORKDAYS(D2,E2),""). This matches Won anywhere in A2.
Why does the formula return a blank?
The IF formula returns an empty string when the status condition is not met. Check the status cell and confirm that the formula references the correct row.




