+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : Counting with Criteria Problem.

  1. #1
    Registered User
    Join Date
    07-28-2011
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Counting with Criteria Problem.

    Greetings,

    I have what I believe is quite a challenging problem to solve.
    I have a list of times in one column, and a list of aircraft types in another column.

    What I need is a way to search an array of times, and return a number of how many of each aircraft type is listed in that time array.

    Example: how many 763 aircraft are listed between 14:00 and 14:59

    I've attached a worksheet of data as an example of the data I'm dealing with. I hope someone can help with this. The actual data set will be significantly larger, but this should do for an example.

    Thanks in advance.
    Chris
    Attached Files Attached Files
    Last edited by Kinf00; 07-28-2011 at 04:50 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Difficult problem

    Hi Kinf00.. Welcome to the forum. I'll take a look at your problem.

    In the meantime, please read through the Forum Rules so you can use and follow them effectively.

    You'll need to EDIT your post above and GO ADVANCED, then change the title to something appropriate for this topic... perhaps "COUNTING WITH CRITERIA".


    In the future, perhaps write out your entire question first, then go back and give it a title, it's usually much better when you do that.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    07-28-2011
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Counting with Criteria Problem.

    Thanks for the heads up, I will do that, I was just in a bit of a rush, as I'm trying to get this sheet working by tomorrow. I do appreciate the help.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Counting with Criteria Problem.

    Many ways to slay this dragon. One way:

    H2 = 14:00 (start time)
    H3 = 14:59 (end time)

    H4 =COUNTIF(A:A,">"&H2) - COUNTIF(A:A,">"&H3) (formatted as General)

  5. #5
    Registered User
    Join Date
    07-28-2011
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Counting with Criteria Problem.

    That only counts everything between 14:00 and 14:59, I need it to only count the number of 763's in that time window

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Counting with Criteria Problem.

    H2 = 14:00 (start time)
    H3 = 14:59 (end time)
    H4 = 763 (Type)

    H6 =SUMPRODUCT(--($A$2:$A100>=H2), --($A$2:$A100<=H3), --($D$2:$D$100=H4))

  7. #7
    Registered User
    Join Date
    07-28-2011
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Counting with Criteria Problem.

    Thats the solution I was looking for. Thanks for your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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