+ Reply to Thread
Results 1 to 8 of 8

Formula to count how manytimes the word true happens in a row

  1. #1
    Registered User
    Join Date
    01-10-2016
    Location
    sweden
    MS-Off Ver
    2014
    Posts
    5

    Formula to count how manytimes the word true happens in a row

    Hello!

    I've been trying to create a formula that counts when the word "True" happens more then once in a row. But no success.

    example:
    False
    True
    True
    False
    True
    False


    So in the example it would be 1 as a result.
    I can't figureout how to do it.

    Any ideas?
    Attached Images Attached Images

  2. #2
    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,938

    Re: Formula to count how manytimes the word true happens in a row

    Hi, welcome to the forum

    (I think you mean column?)

    =COUNTIF(H:H,TRUE)

    Adjust the H:H as needed
    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

  3. #3
    Registered User
    Join Date
    01-10-2016
    Location
    sweden
    MS-Off Ver
    2014
    Posts
    5

    Re: Formula to count how manytimes the word true happens in a row

    Thank you

    the =COUNTIF(H:H,TRUE) counts everything that is true?
    I need it to count only if it's true more then once.

    I appriciate the fast answer though!

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

    Re: Formula to count how manytimes the word true happens in a row

    Try this array formula:

    Please Login or Register  to view this content.
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Last edited by bebo021999; 01-10-2016 at 11:07 PM. Reason: more added
    Quang PT

  5. #5
    Registered User
    Join Date
    01-10-2016
    Location
    sweden
    MS-Off Ver
    2014
    Posts
    5

    Re: Formula to count how manytimes the word true happens in a row

    Thank you very much bebo021999
    I will try this when i get home.

  6. #6
    Registered User
    Join Date
    01-10-2016
    Location
    sweden
    MS-Off Ver
    2014
    Posts
    5

    Re: Formula to count how manytimes the word true happens in a row

    I can't seem to get the formula to work, it wont accept the formula at all. Tried with a random formula to activate array and that worked.
    Last edited by pagsju; 01-11-2016 at 12:27 PM.

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Formula to count how manytimes the word true happens in a row

    bebo021999's formula works just fine. It has to be Array Entered in order to work. You may have to change the commas (,) to semicolons ( ; ) depending on the regional settings of your computer.

    This is a shortened version of bebo021999's formula...Array Enter with Ctrl + Shift + Enter
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  8. #8
    Registered User
    Join Date
    01-10-2016
    Location
    sweden
    MS-Off Ver
    2014
    Posts
    5

    Re: Formula to count how manytimes the word true happens in a row

    Thank you all for the help! it was the commas. Changed it for semicolon.

    Cheers people!

+ 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: 17
    Last Post: 08-12-2015, 04:35 AM
  2. [SOLVED] help need formula to count number with word
    By jericho143 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-15-2015, 04:46 AM
  3. [SOLVED] Search formula = If cell contains word located in another cell = true
    By BPSJACK in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-05-2014, 11:56 AM
  4. [SOLVED] Need to apply individual True/False Value, to Multi-Cell Ratio Count Formula
    By James_D in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-04-2013, 03:55 PM
  5. [SOLVED] formula to count word occurrence for every nth cell
    By jckmd in forum Excel General
    Replies: 8
    Last Post: 06-03-2012, 07:02 PM
  6. True Word Count
    By VegasL in forum Excel General
    Replies: 4
    Last Post: 09-26-2011, 01:30 PM
  7. [SOLVED] How do I stop Excel from changing the word true to TRUE?
    By Schmyerlou in forum Excel General
    Replies: 1
    Last Post: 11-23-2005, 05: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