+ Reply to Thread
Results 1 to 5 of 5

Count number of times one value is higher than another IF criteria is true

  1. #1
    Registered User
    Join Date
    12-17-2013
    Location
    Danmark
    MS-Off Ver
    Excel 2003
    Posts
    3

    Count number of times one value is higher than another IF criteria is true

    Okay, here's the deal.

    I have two columns with values. Then I have a third column with one letter A or B.

    I'm not used to excel, but I've tried my way with COUNTIFS and I'm pretty sure it's the way to go, but I'm lost in the syntax.

    I want to count the number of times the values in the first column is larger than the values in the second column, if the letter is A. And then flip the ">" sign and count that and hopefully the first number is higher.

    I really hope you can help.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,681

    Re: Count number of times one value is higher than another IF criteria is true

    You can't use COUNTIFS - try SUMPRODUCT like this

    =SUMPRODUCT((A2:A100>B2:B100)*(C2:C100="A"))

    that will count rows where col A > col B and also col C = "A" - adjust rows as required
    Audere est facere

  3. #3
    Registered User
    Join Date
    12-17-2013
    Location
    Danmark
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Count number of times one value is higher than another IF criteria is true

    That didn't seem to work. I get #VALUE!.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,681

    Re: Count number of times one value is higher than another IF criteria is true

    Did you use exactly that formula? - see attached example - formula in E2 highlighted
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-17-2013
    Location
    Danmark
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Count number of times one value is higher than another IF criteria is true

    My bad, it works now. Thank you very much.

+ 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: 2
    Last Post: 09-23-2013, 01:09 AM
  2. [SOLVED] Counting up the number of times a value higher than....
    By Cmorgan in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 05-21-2012, 02:28 PM
  3. How to count the number of times an expression is true
    By sherlock99 in forum Excel General
    Replies: 4
    Last Post: 06-22-2011, 06:46 AM
  4. how do i count the number of times criteria appears in a worksheet
    By MarkWatson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-01-2006, 02:15 AM
  5. [SOLVED] How do I count the times a number occurs in a given criteria?
    By w_aller in forum Excel General
    Replies: 3
    Last Post: 02-03-2005, 06:06 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