+ Reply to Thread
Results 1 to 5 of 5

Count number of times an item appears in the list

  1. #1
    Registered User
    Join Date
    05-04-2019
    Location
    belgrade
    MS-Off Ver
    Excel 16
    Posts
    3

    Count number of times an item appears in the list

    If i have a list of 100 true/false statements is there a way i could count how many times true repeats two times in a row also 3 times in a row and so on?
    For an example if i have a list:
    true
    false
    true
    true
    false
    true
    true
    true
    false
    true.


    In example above true appears once in a row three times , two times in a row once and three times in a row once.

    Thank you.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Count number of times an item appears in the list

    Enter your data in Column A starting at A2.

    Formula for B2 =IF(LOWER(A2)<>"true","",IF(LOWER(A1)="true",B1+1,1))

    Formula for C2 =IF(LOWER(A2&A3)="truefalse",B2,"")

    Copy B2 to C2 and fill down.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    05-04-2019
    Location
    belgrade
    MS-Off Ver
    Excel 16
    Posts
    3

    Re: Count number of times an item appears in the list

    im geting "there is a problem with your formula" error

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,800

    Re: Count number of times an item appears in the list

    Try replacing commas (,) with semi-colons ( in the formulae, as required by your locale in Belgrade:

    Formula for B2 =IF(LOWER(A2)<>"true";"";IF(LOWER(A1)="true";B1+1;1))

    Formula for C2 =IF(LOWER(A2&A3)="truefalse";B2;"")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    05-04-2019
    Location
    belgrade
    MS-Off Ver
    Excel 16
    Posts
    3

    Re: Count number of times an item appears in the list

    Great
    Thank you both

+ 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. Replies: 4
    Last Post: 07-31-2018, 04:24 PM
  2. [SOLVED] Count number of times a number appears with count start from next cell of last occurr
    By lesliewheeler in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-29-2018, 09:34 AM
  3. [SOLVED] Function to count the number of times an item appears , fulfilling conditions
    By Aretradeser in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-16-2016, 10:55 AM
  4. [SOLVED] Count the number of times an A appears 5 or more times consecutively
    By CCook310 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 10-02-2013, 04:02 PM
  5. Replies: 3
    Last Post: 04-26-2013, 01:21 PM
  6. Replies: 1
    Last Post: 11-01-2012, 08:37 AM
  7. Replies: 12
    Last Post: 07-21-2011, 09:29 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