# How to check if a time is before a cutoff time in Excel

Take the time of day with MOD(timestamp,1) and compare it with the cutoff: =IF(MOD(B2,1)<$F$1,"Same day","Next day").

**Excel:** `=IF(MOD(B2,1)<$F$1,"Same day","Next day")` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- |
| Order | Placed at | Ships |  | Cutoff | 0.5833333333333334 |
| W-201 | 46323.375 |  |  |  |  |
| W-202 | 46323.6 |  |  |  |  |
| W-203 | 46324.4 |  |  |  |  |
| W-204 | 46324.7 |  |  |  |  |
| W-205 | 46324.55 |  |  |  |  |
| W-206 | 46325.25 |  |  |  |  |

Formula in C2, filled to C7: `=IF(MOD(B2,1)<$F$1,"Same day","Next day")`

Result: Same day; Next day; Same day; Next day; Same day; Same day

## How it works

A date-time is a whole number of days plus a fraction for the time: noon is 0.5. `MOD(B2,1)` keeps only the fraction, the time of day, which is compared with the cutoff, 2:00 PM. W-205 at 1:12 PM ships the same day; W-202 at 2:24 PM waits.

## Other ways

- `=IF(B2-INT(B2)<$F$1,"Same day","Next day")`: INT strips the time, so B2-INT(B2) is the time of day.
- `=IF(TEXT(B2,"hh:mm")<"14:00","Same day","Next day")`: Compares the time as text. It works because zero-padded 24-hour times sort in order, but a cutoff in a cell is easier to change.

## Common mistakes

- Comparing the whole timestamp with the cutoff (`B2<$F$1`) compares a date with a time and is never TRUE.
- Typing "14:00" in quotes in the comparison compares text with a number. Keep the cutoff in a cell, or use TIME(14,0,0).

## Questions

**How do I check if a time is between two times?**

`=AND(MOD(B2,1)>=TIME(9,0,0),MOD(B2,1)<TIME(17,0,0))`.

**How do I return the ship date instead?**

`=INT(B2)+(MOD(B2,1)>=$F$1)`, formatted as a date, adds a day for late orders.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/check-if-time-is-before-cutoff
