+ Reply to Thread
Results 1 to 6 of 6

Eliminate count if condition is obeyed for more than once

  1. #1
    Forum Contributor
    Join Date
    09-19-2017
    Location
    London
    MS-Off Ver
    2015
    Posts
    169

    Question Eliminate count if condition is obeyed for more than once

    Hi, all

    I have these formula to count the cell ranges if the data inside obeys this specific condition, i.e. less or more than data in cell H6. Here's an example.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    How can I alter this formulae so that they will eliminate the count if the condition of (>H6) is obeyed in this manner:

    H6 = 20

    21, 18, 19, 22, 23, 24, 17, 16, 22

    The count will be 3 instead of 5.

    Anyone knows? Thanks in advance for the help!

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Eliminate count if condition is obeyed for more than once

    It's not a good idea to try to communicate with us through formulas. Because of this, I'm not going to try to understand what your formulas are doing.

    Given the numbers towards the bottom of your post (21, 18, 19, 22, 23, 24, 17, 16, 22), why should the count be 3? Which 3 numbers should be included and why?

  3. #3
    Forum Contributor
    Join Date
    09-19-2017
    Location
    London
    MS-Off Ver
    2015
    Posts
    169

    Re: Eliminate count if condition is obeyed for more than once

    The condition of count that has to be obeyed is when data in specific cell ranges is more than data in cell H6.

    The count will only count 3 instead of 5 and the numbers are: 21, (22, 23, 24), 22.
    22, 23 and 24 will be counted as once. To conclude, my formula should ignore if the condition is obeyed more than one time consecutively.

    Hope that helps.

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Eliminate count if condition is obeyed for more than once

    Using that sample of numbers, assuming that they are in A1:A9 and 20 is in cell C1, try this:

    =SUMPRODUCT(--(FREQUENCY(IF(A1:A9>=C1,ROW(A1:A9)),IF(A1:A9<C1,ROW(A1:A9)))>0)) Ctrl Shift Enter

    This formula will return 3.

    If you are unable to adjust this to match your scenario, consider uploading a small representative sample of your workbook along with the desired result (manually entered).

    To attach an Excel workbook, click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Forum Contributor
    Join Date
    09-19-2017
    Location
    London
    MS-Off Ver
    2015
    Posts
    169

    Question Re: Eliminate count if condition is obeyed for more than once

    Hereby I attached an example of data to be counted. In column B, the count formula is in cell B93 - if either range of B9:B32 or B39:B62 is more than 50, data in B69:B92 will be counted if they are more than 530 in H6.

    Meanwhile, in E column, E39:E62 will be counted in E63 if they are less than 80 in cell I6.

    How can I alter these formula to avoid counting if the condition in H6 and I6 are obeyed consecutively in succession?

    Hoping for advices. Thanks in advance!
    Attached Files Attached Files

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Eliminate count if condition is obeyed for more than once

    Try these:

    B93 =SUMPRODUCT(--(FREQUENCY(IF(((B9:B32>50)+(B39:B62>50))*(B69:B92>H6),ROW(B69:B92)),IF(B69:B92<=H6,ROW(B69:B92)))>0)) Ctrl Shift Enter

    E63 =SUMPRODUCT(--(FREQUENCY(IF((E9:E32=1)*(E39:E62<I6),ROW(E39:E62)),IF(E39:E62>=I6,ROW(E39:E62)))>0)) Ctrl Shift Enter

+ 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] How to eliminate a if condition
    By shukla.ankur281190 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-18-2018, 09:39 AM
  2. Formula Required to Count Rows only if condition is meet or else dont count
    By Shahbazk in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-22-2017, 08:39 AM
  3. Count if condition
    By gmohta92831 in forum Excel General
    Replies: 2
    Last Post: 06-11-2016, 10:50 AM
  4. [SOLVED] How to count a condition based on having another condition?
    By Robster in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-12-2014, 04:17 PM
  5. [SOLVED] How to count with condition
    By yukioh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-07-2012, 02:44 AM
  6. Separate Text in A Single Cell & Count and Eliminate Duplicates
    By cuclay in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2011, 10:31 PM
  7. [SOLVED] Pivot Table- how do I eliminate duplicates in count of name
    By Isabelga in forum Excel General
    Replies: 1
    Last Post: 01-16-2006, 02:20 PM

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