+ Reply to Thread
Results 1 to 7 of 7

Need Assistance with a Count Function!

  1. #1
    Registered User
    Join Date
    06-29-2011
    Location
    South Carolina
    MS-Off Ver
    Excel 2003
    Posts
    20

    Need Assistance with a Count Function!

    Hello there,

    I need a working count function to determine the number of times that a certain column drops to zero. The tough part for me is that this column will change to 0 for a variable number of entries. Sometimes it will be at 0 for 5 entries, or just one - but either way I need to be able to count them the same.

    Any help/advice will be much appreciated!
    Attached Files Attached Files
    Last edited by alecp; 01-27-2012 at 12:09 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Need Assistance with a Count Function!

    So do you want to count how many groups of 0's there are whether it is one 0 or more 0's?

    If so, try:

    =SUM(IF(FREQUENCY(IF(B3:B53=0,ROW(B3:B53)),IF(B3:B53<>0,ROW(B3:B53)))>=1,1))

    confirmed with CTRL+SHIFT+ENTER not just ENTER.

    If not, please tell us expected result and why?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-29-2011
    Location
    South Carolina
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Need Assistance with a Count Function!

    Quote Originally Posted by NBVC View Post
    So do you want to count how many groups of 0's there are whether it is one 0 or more 0's?
    Yes that is what I want to do. However I tried to use the posted formula and it did not work for me (pardon my newbie level Excel expertise). Is there a way I could see the test excel file with the formula placed and functioning?

    Thank you!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Need Assistance with a Count Function!

    Here you go.

    After you enter the formula, you need to hold the CTRL and SHIFT keys down and hit ENTER so that { } brackets embrace the formula..
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-29-2011
    Location
    South Carolina
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Need Assistance with a Count Function!

    Ah that works wonderfully! Thank you...but I realized that I need to be able to have the column C in the test sheet have a single 1 whenever there are zeros, no matter the number of consecutive zeroes. This is so that in the full form of the file I have (that is always subject to 10,000 data entries changing constantly), I can see where the zeroes occured, but also use your formula that you have provided above to count them in total. Sorry for needing the additional help, but this would be wonderful if you could help me with it!

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Need Assistance with a Count Function!

    You mean formula:

    =IF(AND(B3=0,B2<>0),1,"")

    copied down

  7. #7
    Registered User
    Join Date
    06-29-2011
    Location
    South Carolina
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Need Assistance with a Count Function!

    Ah thats so simple, sometimes I just want to slap myself and my own stupidity. But than you for both points and I hope you have a great day! You're a good excel forum person moderator guy or however I should put that

+ 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