How to count cells between two times in Excel?
If I have a list of time cells, now, I want to count the number of cells between two given times as following screenshot shown, how could I quickly count the number of cells between two specific times in Excel?
To get the number of cells between two times, the following formula can help you, please do as follows:
Please enter this formula into a blank cell where you want to locate the result:
=SUMPRODUCT(($A$1:$A$16>=C1)*($A$1:$A$16< D1)), E1, for example, then drag the fill handle down to the cells to get the result, see screenshot:
Note: In the above formula, A1:A16 is the time list that you want to use, C1 and D1 are the two specific times that you want to count the cells between them.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!