Excel – VBA Script – Count the date and Time stamp in a single column

Excel – VBA Script – Count the date and Time stamp in a single column, and report out How many overall count; how many in 0 to 30 days, how many in 31 to 60 days, how many in 61 to 90 days, how many on 90 day plus. Must be able to reference to target column in the script and be able to provide column for the results.

For example:

  1. Column A would have the Timestamps
  2. Column B would have Total counts of Time Stamps
  3. Column C would have Total Timestamps in 0 to 30 Days (starting at today date)
  4. Column D would have Total timestamps in 31 to 60 days (starting at today date)
  5. Column E would have Total timestamps in 61 to 90 days (Starting at today date)
  6. Column F would have Total timestamp for 91 days plus (starting at today date)

Here is an example of how the data in Column A looks like:

2018-04-13 09:52:50 UTC, 2018-04-13 09:41:54 UTC, 2018-04-11 13:58:25 UTC, 2018-04-11 13:01:11 UTC, 2018-04-11 09:46:22 UTC, 2018-04-06 09:40:24 UTC, 2018-03-20 08:34:27 UTC, 2018-02-16 13:34:12 UTC, 2018-02-08 11:21:09 UTC, 2018-02-07 11:18:24 UTC, 2018-01-24 10:58:00 UTC, 2017-12-21 07:34:40 UTC, 2017-11-30 14:40:07 UTC, 2017-11-23 11:24:09 UTC, 2017-11-23 10:12:21 UTC, 2017-10-18 08:36:45 UTC, 2017-09-18 08:11:18 UTC, 2015-09-17 15:55:49 UTC,

At time there will be blank values in Column A – therefore resulting in Zero value in all preceding columns.

Would want to post the results in the same worksheet; if the worksheet has data from column A to AO, and timestamps are in Column L would like to have the subsequent results per row posted in Column AP and on with Headers

Also Target Data columns and results column could change so being able to easily change the column in the script would be a great help

If someone can help with a VBA script that would be awesome

Top Contributor Asked 33 mins ago in VBA: Macros.
Add Comment
0 Answer(s)
  • Found this useful?

    Please share using the share button above.

    If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.

    Found the answer useful and wants to credit the user, then vote the answer (vote up).

  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.