+ Reply to Thread
Results 1 to 7 of 7

Basic counting formula required

  1. #1
    Registered User
    Join Date
    05-25-2009
    Location
    Mt Isa, Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Wink Basic counting formula required

    Hi, new to forum, long time reader, firts time poster. Basic question if someone can help me please.
    I have a column that has series of a number (I can change this) eg:

    1 ___ 1
    2 ___ 1
    3 ___ 1
    4
    5
    6
    7 ___ 1
    8 ___ 1
    9
    10
    11
    12 __ 1
    13 __ 1
    14 __ 1
    15
    16
    17 __1

    What I want is a counter that counts how many SETS of '1' there are. So for the example above the answer is '4'.

    Can anyone help?

    Thanks

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Basic counting formula required

    In next column (for example C1) add =MAX(B1-B2;0) and extend down

    Counting 1's now will give you number of sets.

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

    Re: Basic counting formula required

    Try:

    Please Login or Register  to view this content.
    Confirmed with CTRL+SHIFT+ENTER not just ENTER.. You will see { } brackets appear.
    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.

  4. #4
    Registered User
    Join Date
    05-25-2009
    Location
    Mt Isa, Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Basic counting formula required

    Quote Originally Posted by NBVC View Post
    Try:

    Please Login or Register  to view this content.
    Confirmed with CTRL+SHIFT+ENTER not just ENTER.. You will see { } brackets appear.
    Hey thanks a lot! works brilliantly. I don't think I would have figured that out for myself.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Basic counting formula required

    You could also perhaps use SUMPRODUCT ?

    =SUMPRODUCT(--(A1:A17=1),--(A2:A18<>1))

  6. #6
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Basic counting formula required

    I cannot understand, what FREQUENCY does here?
    please explain me someone...
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

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

    Re: Basic counting formula required

    Try going through Formula Auditing and evaluate the formula to see how it gets evaluated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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