+ Reply to Thread
Results 1 to 6 of 6

Stop formula counting when it is equal to another cell?

  1. #1
    Forum Contributor
    Join Date
    01-18-2013
    Location
    England
    MS-Off Ver
    2016 (Mac)
    Posts
    149

    Talking Stop formula counting when it is equal to another cell?

    Hello Everyone!,

    I need a formula modified (below) in order to stop when it is equal to cell C6.
    The below formula is in cell AF150 and will produce a number:

    =IF(COUNTIF(D10:Y10,">0")>TODAY()-C3,COUNTIF(D10:Y10,">0"),TODAY()-C3)

    Cell C3 contains a date (start date). As each day goes by the above formula will take today's date and minus the start date (Cell C3) giving a number.

    This works fine but I do not want the number that it produces to continue counting when it is equal to cell C6 (cell C6 just contains a number only no formulas at all).
    I would like to stop cell AF150 adding when the number it produces is the same as the number in cell C6.

    So basically cell C6 contains the number 8 (for example) and when cell AF150 displays the number 8 I want it to stop and not display 9 or above. I do not want it to count past number 8 (or whatever number cell C6 contains).

    Thank you very much for any help, I am totally confused!

    Regards,

    Margate
    Last edited by Margate; 06-04-2013 at 02:58 PM. Reason: Previous post was confusing!

  2. #2
    Registered User
    Join Date
    04-22-2012
    Location
    Syracuse, NY, USA
    MS-Off Ver
    Office 365
    Posts
    61

    Re: Stop formula counting when it is equal to another cell?

    Hi Margate,

    Perhaps something like this:
    Please Login or Register  to view this content.
    This should make the cell output the value of C6 anytime that the formula you wrote would give a value above the value of C6.

    I hope this helps.
    Reality is stranger than fiction.

  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
    52,939

    Re: Stop formula counting when it is equal to another cell?

    =IF(COUNTIF(D10:Y10,">0")=C6,"whatever_you_want_here,IF(COUNTIF(D10:Y10,">0")>TODAY()-C3,COUNTIF(D10:Y10,">0"),TODAY()-C3))
    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
    Forum Contributor
    Join Date
    01-18-2013
    Location
    England
    MS-Off Ver
    2016 (Mac)
    Posts
    149

    Re: Stop formula counting when it is equal to another cell?

    Perfect! Thank you very much RGrunden, this is exactly what I was looking for

    Margate
    Last edited by Margate; 06-08-2013 at 07:51 PM.

  5. #5
    Forum Contributor
    Join Date
    01-18-2013
    Location
    England
    MS-Off Ver
    2016 (Mac)
    Posts
    149

    Re: Stop formula counting when it is equal to another cell?

    Thank you very much for your help FDibbins, much appreciated.

    Margate.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Stop formula counting when it is equal to another cell?

    Slightly shorter:

    =MIN(MAX(COUNTIF(D10:Y10,">0"),TODAY()-C3),C6)

    Hope this helps.

    Pete

+ 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