How to Count Time Values Greater Than or Less Than 3:00 in Excel
Question details
The user needs to count the number of cells containing time values that are either earlier or later than a specific time limit, such as 3:00.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Analyzing time-tracking data, shift schedules, or logs where instances of a specific time threshold being crossed must be counted.
- Observed behavior
- Using the SUMIF function incorrectly sums the time fractions of a day instead of providing a standard numerical count, requiring the use of COUNTIF for an accurate tally.
Ensure that your target cells are formatted as Time values rather than plain text, as spreadsheet formulas require properly formatted data to perform logical time comparisons.
Use the COUNTIF Function to Count Specific Time Ranges
The COUNTIF function is the most reliable method for counting cells based on time criteria without mistakenly summing up time fractions.
Spreadsheets store time as a decimal fraction of a 24-hour day. Because of this, using SUMIF will add these fractions together, often resulting in an unexpected time format instead of a whole number. To get the actual number of entries that meet your criteria, COUNTIF must be used with quotation marks around the logical operators and the time value.
Click on the cell where you want the final count result to appear.
Type =COUNTIF(M2:M110,"<3:00") to count all time values earlier than 3:00 in the cell range M2:M110.
Alternatively, type =COUNTIF(M2:M110,">3:00") to count all time values later than 3:00.
Hit the Enter key on your keyboard to apply the formula and view your total numerical count.

Count and Analyze Time Values Easily in WPS Spreadsheet
WPS Spreadsheet fully supports essential functions like COUNTIF, allowing you to seamlessly analyze time data, shift schedules, and logs without worrying about formula compatibility.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open the workbook containing your time data.
- 2. Locate the function wizard: Click on the 'Formulas' tab and select 'Insert Function' to easily find the COUNTIF tool.
- 3. Define your range and criteria: Select your time data range (e.g., M2:M110) and input your time threshold criteria, such as "<3:00".
- 4. Calculate the result: Click 'OK' or press Enter to instantly calculate the total number of matching time entries.

Frequently Asked Questions
Why does my COUNTIF formula return 0 when I have times earlier than 3:00?
This usually happens because the time values in your cells are stored as plain text rather than actual time formats. Select your cells, right-click to select 'Format Cells', and change the category to 'Time'.
How do I count time values between two specific times?
You can use the COUNTIFS function to apply multiple criteria to the same range. For example, using =COUNTIFS(M2:M110,">1:00", M2:M110,"<3:00") will accurately count times that fall strictly between 1:00 and 3:00.
Why is SUMIF giving me a random time instead of a standard number?
The SUMIF function adds the actual underlying decimal values of the times together. Since 24 hours equals 1 in the spreadsheet's system, summing multiple fractions of a day usually results in a larger decimal that is formatted as another time value, rather than providing a count of occurrences.
Can I reference a cell instead of typing 3:00 manually in the formula?
Yes. If your target time is stored in cell A1, you can concatenate the logical operator with the cell reference using an ampersand, like this: =COUNTIF(M2:M110, "<" & A1).




