Function Problems

Use IF and NETWORKDAYS to Calculate Working Days in Excel

Elise WilliamsElise Williams Nov 18, 2026 871 views

Question details

Calculate working days between two dates only when a status field is Won; otherwise, return a blank result.

Calculate Working Days in Excel Only When Status Is Won
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.
Before you start

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.

Solution 1Recommended

Use IF and NETWORKDAYS for a Single Status Cell

Use this formula when one cell contains the status for each record.

1
Enter the formula

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.

2
Apply it to other rows

Press Enter, then drag the result cell's fill handle down to copy the formula to other records.

Use IF and NETWORKDAYS for a Single Status Cell
How the days are counted: NETWORKDAYS includes the start and end dates when they are working days and excludes Saturdays and Sundays by default.
Calculate working days in WPS

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. 1. Open the worksheet: Open WPS Spreadsheets and select File > Open to choose your workbook.
  2. 2. Select a result cell: Click the cell where you want the working-day count for the first record.
  3. 3. Enter the formula: Type =IF(A2="Won",NETWORKDAYS(D2,E2),"") and adjust the references to your status and date cells.
  4. 4. Fill the remaining rows: Press Enter, then drag the cell's fill handle down to calculate results for the other records.
Calculate working days conditionally with familiar spreadsheet formulasOpen and edit Microsoft Excel XLS and XLSX filesUse a familiar spreadsheet interface
microsoft office alternative - wps office

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.