+ Reply to Thread
Results 1 to 7 of 7

Count if less than range

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    69

    Count if less than range

    Hi there, I am having real difficulty in figuring this out. The attached document will explain what I mean best but I need 1 formula that will count all instances where a number in row 2 is less than the number above it in row 1. I have highlighted the cell where this instance is true. So the formula should spit out 1 as there is one instance where this true. I want this to be in one formula and not have like a running check in row 3 as I could easily do that. The formula needs to check that the number in row 2 is less than row 1, it can't be done by doing a sum on each row as you will notice in column b the row 2 number is higher than the row 1 number which kind of rules out this method.

    As an added bonus if it is possible it would be great to have a formula that actually tells you the difference of when row 2 is lower than row 1. That is, at the moment in the 1 instance where row 2 is less than row 1, it would be good to know how much less that number is, so the answer would be 1 as it would be 1-0=1. But let's say instead of J1 being 1 it was 5, the difference amount would be 4.

    Thanks so much for your help in advance!

    Count If Less Than Range.xlsx

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Count if less than range

    Hi martin,

    See if this works for you. It is your problem with two helper rows.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    10-10-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Count if less than range

    Hi Marvin,

    This is fantastic thanks so much for your help. I think I have to settle for this. Do you think it is at all possible to achieve what I want without any helper rows?

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count if less than range

    If I understand what you're asking try this...

    =SUMPRODUCT(--(A2:J2<A1:J1),A1:J1-A2:J2)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    10-10-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Count if less than range

    Awesome, thanks Tony!

  6. #6
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Count if less than range

    No helper rows, no problem.

    =SUMPRODUCT(--(A1:J1>A2:J2))

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count if less than range

    You're welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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