+ Reply to Thread
Results 1 to 8 of 8

Counting within a range then stop

Hybrid View

  1. #1
    Registered User
    Join Date
    03-24-2015
    Location
    Jacksonville, Fl
    MS-Off Ver
    2010
    Posts
    1

    Angry Counting within a range then stop

    Cant figure out how to count till you reach a value then stop. Count till you reach 4166 on the list below....

    0
    0
    0
    0
    0
    0
    120
    3360
    4590
    3450
    4440
    4500
    3150
    3670
    4050
    3870
    4290
    4260
    3750

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Counting within a range then stop

    Im sorry but Im not sure what you mean? Firstly there is no 4166 in the list, secondly do you mean count the number of rows, sum the values etc? what do you expect as the answer from your example?
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,082

    Re: Counting within a range then stop

    in B1
    enter the value you want to stop at (ie the last counted value).
    in B2
    =COUNT(INDIRECT("A1:A"&MATCH(B1,A$1:A$19,0)))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,082

    Re: Counting within a range then stop

    I wish people would check their test data before they post

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,658

    Re: Counting within a range then stop

    If Column A contains values (not text)

    =IFERROR(MATCH(4166,A1:A100,0),0)
    Quang PT

  6. #6
    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
    53,049

    Re: Counting within a range then stop

    Perhaps this...
    =COUNTIF(A1:A19,"<=4166")
    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

  7. #7
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,658

    Re: Counting within a range then stop

    Quote Originally Posted by FDibbins View Post
    Perhaps this...
    =COUNTIF(A1:A19,"<=4166")
    That list is unsorted, Ford

  8. #8
    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
    53,049

    Re: Counting within a range then stop

    It still works, it counts everything under 4166. That was my take on the question, we will have to see what the OP really wants

+ 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. Stop Counting After Today
    By enid09 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-02-2014, 11:01 AM
  2. Stop a counting formula
    By pattaz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-09-2013, 06:06 AM
  3. Excel 2007 : stop counting day to day
    By tochu2 in forum Excel General
    Replies: 6
    Last Post: 03-28-2012, 08:38 PM
  4. Stop counting days and strikethrough
    By stevieaim in forum Excel General
    Replies: 3
    Last Post: 05-14-2009, 11:21 AM
  5. [SOLVED] [SOLVED] Spinbutton won't stop counting
    By Izran in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-16-2005, 12:00 PM

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