Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to count number of occurrence in a datetime range in Excel?

doc count occurrence between datetime 1
Supposing you have a table recording the absence time of one staff in your company, and now you want to count the number of the absence between two dates as below screenshot shown, how can you quickly count it out in Excel?

Count number of occurrences in a date range with formulas

Count number of occurrences and select in a date range with Kutools for Excel good idea3

Select Specific Cells

With Kutools for Excel's Select Specific Cells utility, you can select cells/row/columns based on one ore two criteria, then format them as you need, such change the font size, background and so on.

doc select specific cells

Count number of occurrences in a date range with formulas


Here I introduce a formula to quickly count the occurrence between two dates.

Select a blank cell that you want to place the count result, and enter this formula =SUMPRODUCT((A2:A14>=$D$1)*(A2:A14<=$D$2)), press Enter key. Now the number of occurrence in date range has been counted.
doc count occurrence between datetime 2

In above formula, A2:A14 is the data list you want to count from, and D1 is the start date, D2 is the end date. You can change them as you want.


Count number of occurrences and select in a date range with Kutools for Excel

If you want to count and then highlight the location of occurrences in a specific date range, you can apply the Select Specific Cells utility of Kutools for Excel.

Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

After free installing Kutools for Excel, please do as below:

1. Select the data rang, and click Kutools > Select > Select Specific Cells. See screenshot:
doc count occurrence between datetime 3

2. In the Select Specific Cells dialog, check one type of selection you want, select Greater than from first drop down list and select the start date into next textbox, and go to second drop down list to select Less than and select the end date into the beside textbox, then check And option. see screenshot:
doc count occurrence between datetime 4

3. Click Ok or Apply, a dialog pops out to remind you how many matched cells have been selected, and at the same time the records between the start date and end date have been selected.
doc count occurrence between datetime 5


Recommended Productivity Tools for Excel

kte tab 201905

Kutools for Excel Helps You Always Finish Work Ahead of Time, and Stand Out From Crowd

  • More than 300 powerful advanced features, designed for 1500 work scenarios, increasing productivity by 70%, give you more time to take care of family and enjoy life.
  • No longer need memorizing formulas and VBA codes, give your brain a rest from now on.
  • Become an Excel expert in 3 minutes, Complicated and repeated operations can be done in seconds, 
  • Reduce thousands of keyboard & mouse operations every day, say goodbye to occupational diseases now.
  • 110,000 highly effective people and 300+ world-renowned companies' choice.
  • 60-day full features free trial. 60-day money back guarantees. 2 years of free upgrade and support.

Brings Tabbed Browsing and Editing to Microsoft Office, Far More Powerful Than The Browser's Tabs

  • Office Tab is designed for Word, Excel, PowerPoint and Other Office Applications: 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!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.