+ Reply to Thread
Results 1 to 4 of 4

COUNTIF functions - Help with formula

  1. #1
    Registered User
    Join Date
    02-24-2012
    Location
    Kansas City
    MS-Off Ver
    Excel 2010
    Posts
    13

    COUNTIF functions - Help with formula

    I need to determine the number of occurrences in my spreadsheet of how many trips (Cell E2,E60, see attached spreadsheet) were under 10 minutes, how many were 10-20, how many were 20-30, and how many were over 1:00 hour. I thought I needed to do this as a CountIF formula with a greater than, less than equation. However, I keep getting an error message on my value.

    My ultimate goal is to prepare a bar chart showing the number of trips in a given time for each of my drivers.

    Please help? I have attached a sample copy of the data.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: COUNTIF functions - Help with formula

    Try

    Less than 10
    =COUNTIF(D:D,"<0:10:00")

    10-20
    =COUNTIFS(D:D,">=0:10:00",D:D,"<0:20:00")


    That should be enough to get you going.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: COUNTIF functions - Help with formula

    for the 1st 1 (10)...
    =COUNTIF(E:E,"<10")
    for the others, modify this as needed...
    =COUNTIFS(E:E,">=10",E:E,"<20")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    02-24-2012
    Location
    Kansas City
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: COUNTIF functions - Help with formula

    Formulas provided worked great, except when I check my totals, I do not get the same total number as the amount of rows that I have. I have entered the formulas in cells J2 - P2 (see attached spreadsheet). I sorted my spreadsheet by trip time to spot check to make sure that I was getting all trip times. I have 406 rows, minus my header row, leaving 405 trips. There are several cells with blank trip times, however when I auto sum J2-P2, I come up 372 trips, when I should have 406.

    What am I doing wrong here? Any help would be appreciated?

    Thank you SO MUCH! This forum is AWESOME!
    Attached Files Attached Files

+ 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. Can i use two CountIf functions in one formula?
    By dandavis1 in forum Excel General
    Replies: 3
    Last Post: 11-01-2010, 07:52 AM
  2. Using Countif with another functions
    By garungaha1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-01-2006, 08:20 PM
  3. COUNTIF / AND functions
    By brianwakin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-15-2005, 06:10 PM
  4. [SOLVED] Countif's and And functions
    By Danielle in forum Excel General
    Replies: 2
    Last Post: 10-13-2005, 04:05 PM
  5. [SOLVED] Right and Countif functions
    By virfir97@yahoo.com in forum Excel General
    Replies: 5
    Last Post: 08-28-2005, 08:05 AM

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