+ Reply to Thread
Results 1 to 6 of 6

Countif problem - Probably a formatting problem

  1. #1
    Registered User
    Join Date
    09-12-2020
    Location
    Stratford upon Avon
    MS-Off Ver
    Office 365
    Posts
    3

    Question Countif problem - Probably a formatting problem

    Attachment 694916

    I'm stumped with this little problem. In Column B I have a load of durations formatted as Custom mm:ss and in cells D2:J2 I have some other durations also formatted as Custom mm:ss. All I want to do is count how many cells in the B column are less than the duration in cell D2. I'm assuming that a Countif formula is the best way to do but I can't get it to work. Cell D3 should really be showing 7, not 371. Any ideas what I'm doing wrong?
    Attached Files Attached Files
    Last edited by simonwilliamstutor; 09-13-2020 at 02:51 AM. Reason: Attaching spreadsheet

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Countif problem - Probably a formatting problem

    Change the logic ">="
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Registered User
    Join Date
    09-12-2020
    Location
    Stratford upon Avon
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Countif problem - Probably a formatting problem

    Quote Originally Posted by shukla.ankur281190 View Post
    Change the logic ">="
    That makes the result 0.

  4. #4
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Countif problem - Probably a formatting problem

    It seems that your B column is in Text format... Change it into time format

    For better solution please share the sample file

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Registered User
    Join Date
    09-12-2020
    Location
    Stratford upon Avon
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Countif problem - Probably a formatting problem

    Thanks. I've attached the spreadsheet to the OP. I've changed all the durations to Time format and stripped out any extraneous data. Cell C2 should give a result of 7, but as you'll see in the attached file it's still showing 0.

  6. #6
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: Countif problem - Probably a formatting problem

    Hi, amend the formula from COUNTIF(A1:A371,"<=C2") to
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click just below left if it helps, Boo?ath?

+ 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. [SOLVED] Countif problem
    By MOUNIR75 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-08-2019, 11:03 AM
  2. [SOLVED] Countif problem
    By Phlegon_of_Tralles in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-02-2017, 02:46 PM
  3. [SOLVED] Countif problem
    By muish in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-21-2013, 07:51 AM
  4. Countif Value problem
    By James580 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-09-2008, 03:47 PM
  5. COUNTIF Problem
    By acsishere in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-14-2008, 10:12 AM
  6. COUNTIF / SUM problem
    By RobPot in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 09-06-2005, 06:05 PM
  7. [SOLVED] Countif Problem
    By dave in forum Excel General
    Replies: 3
    Last Post: 08-23-2005, 08:05 AM

Tags for this Thread

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