Calculate Cycle Time by Job Type and Completion Date in WPS Spreadsheet
Question details
Calculate cycle time in M2 using the start date for the job type, leaving the result blank when the completion date is empty.

- Product
- WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- A worksheet lists the job type in C2, the Build start date in F2, the Spec start date in I2, and the completion date in L2.
- Observed behavior
- The desired result is the number of days from the applicable start date to the completion date, or a blank if L2 is empty.
Check that C2 contains the job type, F2 and I2 contain valid start dates, and L2 contains the completion date. The formula below assumes every job type other than Spec should use the Build start date.
Calculate cycle time with an IF formula
Use this formula when C2 contains Spec or Build and you want a blank result until L2 has a completion date.
Select M2, enter =IF(L2="","",L2-IF(C2="Spec",I2,F2)), and press Enter.
Select M2 and use the Home tab's number format menu to choose Number or General so the result appears as a day count.
Drag the fill handle at the lower-right corner of M2 down through the rows that need cycle-time calculations.

Calculate job cycle times in WPS Spreadsheet
Use WPS Spreadsheet to enter the conditional formula, format the result as a number, and apply it to the rest of your jobs.
- 1. Open the worksheet: Open WPS Spreadsheet and select Open to load the workbook containing your job data.
- 2. Enter the cycle-time formula: Select M2, enter =IF(L2="","",L2-IF(C2="Spec",I2,F2)), and press Enter.
- 3. Format and copy: Choose Number or General from the Home tab's number format menu, then drag M2's fill handle down to apply the formula to other rows.

Frequently Asked Questions
Can I use the DAYS function instead of subtraction?
Yes. Enter =IF(L2="","",DAYS(L2,IF(C2="Spec",I2,F2))) in M2. It calculates the same day difference for valid dates.
Why does the result look like a date?
The result cell may have a date format. Select M2 and choose Number or General from the Home tab's number format menu.
What happens if C2 contains a job type other than Spec or Build?
The formula uses F2 for any value other than Spec. If other job types should return a blank, use =IF(L2="","",IF(C2="Spec",L2-I2,IF(C2="Build",L2-F2,""))) in M2.
Does this formula count calendar days or workdays?
It counts calendar days, including weekends and holidays. Subtracting one date from another returns the elapsed number of days.




