Tag Excel Times as HIT or MISSED with an IF Formula
Question details
Create a formula that compares times in two Excel columns and labels each row HIT or MISSED.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Compare the time in column S with the time in column W for each row.
- Observed behavior
- A row should show MISSED when the time in column S is later than the time in column W, and HIT when it is equal or earlier.
Check that columns S and W contain valid Excel time values, not times stored as text. Identify the first row to compare and choose an empty output column other than S or W.
Compare the two times with an IF formula
Use this formula to mark later times as MISSED and equal or earlier times as HIT.
In Excel, select an empty cell on the first data row, such as X10, alongside the times in S10 and W10.
Type =IF(S10>W10,"MISSED","HIT") in X10 and press Enter. Change the row number or column letters if your times are elsewhere.
Select X10 and drag its fill handle down the output column to apply the formula to the remaining rows.

Label times as HIT or MISSED in WPS Spreadsheets
Open your spreadsheet in WPS Spreadsheets and use the same IF formula to compare times and label each row.
- 1. Open the workbook: In WPS Spreadsheets, open the workbook containing the times in columns S and W.
- 2. Choose an output cell: Click an empty cell on the first data row, such as X10.
- 3. Enter the formula: Type =IF(S10>W10,"MISSED","HIT") and press Enter. Adjust the references to match your sheet.
- 4. Apply it to other rows: Select the formula cell and drag its fill handle down to label the remaining rows.

Frequently Asked Questions
What happens when the two times are equal?
The formula =IF(S10>W10,"MISSED","HIT") returns HIT because S10 is not later than W10.
Can I put the formula in column W?
Not if the formula refers to the same cell in column W. Enter it in a separate output column, such as X, to avoid a circular reference.
Why might the formula give an unexpected result?
Check that both cells contain actual time values rather than text. Also check for date components: Excel compares the full date and time values, even if only the times are displayed.
How do I compare times that cross midnight?
Enter the correct date and time in each cell before comparing them. A time-only value does not show whether it belongs to the previous or next day.




