+ Reply to Thread
Results 1 to 3 of 3

program a formula to count number of times event occur before a specific time.

  1. #1
    Registered User
    Join Date
    09-16-2014
    Location
    Miami
    MS-Off Ver
    2013
    Posts
    30

    program a formula to count number of times event occur before a specific time.

    Hello,
    Not sure if this requires a formula. Column C is the answer and counts the number of times taxis arrive before the time in column B. For example, 3 means that 3 taxis arrived before 6:57.
    So basically I am trying to count the number of times taxis arrive (see the sheet attached).
    Again, I need to count the number of times it arrived before 6:57 (30 minutes from the starting time 6:27), which is C2.
    However, column D is not in time format and while I could change column B to remove the colon, i dont think it can be compared to column D. In addition, I need to do this to multiple sheets and it would be inconvienent to add 30 minutes to 6:27 if it is not in time format (i think).
    I know its not hard to do manually but I have to do this many many sheets and will probably make mistakes. Can anyone help write a function so I can get column C (final desired column)?

    Thanks!!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: program a formula to count number of times event occur before a specific time.

    If they were both times, you could use countif, but you're going to need to do some messing, but i think it is poss with a formula.

    i'll keep looking in a bit.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: program a formula to count number of times event occur before a specific time.

    Ok,

    I had my times of taxi's like 0627, 0628 etc, in A1:A14, and my reference times, like 06:30, 07:00 etc in b1:b3, then in c1:c3, i had the following

    Please Login or Register  to view this content.
    This is an array formula, so you'll need to press CTRL SHIFT ENTER when entering.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 07-14-2013, 07:29 PM
  2. Replies: 4
    Last Post: 11-07-2012, 04:02 PM
  3. [SOLVED] Flagging formula for file names that do not occur a set number of times
    By njmiller31 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-23-2012, 09:34 PM
  4. [SOLVED] Formula to count number of times specific word used in column range
    By flammer4 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-07-2012, 01:42 PM
  5. Determining how many times an event occur
    By DrStrangelove in forum Excel General
    Replies: 2
    Last Post: 09-18-2009, 03:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1