+ Reply to Thread
Results 1 to 18 of 18

Count true / false contunuesly from down to up

  1. #1
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Count true / false contunuesly from down to up

    Dear Sir / Mam

    In my excel sheet1, column B:H has mixed values ​​like "TRUE" and "FALSE", I take the meaning from down line to continues till the top if the last one has "TRUE" then "TRUE" How many values ​​should be counted, if the last one is "FALSE" then how many "FALSE" values ​​should be counted till the top, for that a formula is needed.

    COUNT TRUE FALSE.JPG

    also attached workbook.

    Pls help me.
    Thank you in Advance.
    Attached Files Attached Files

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

    Re: Count true / false contunuesly from down to up

    Are you still using Excel 2016?
    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.

  3. #3
    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,853

    Re: Count true / false contunuesly from down to up

    If you have 365, this copied across:

    =COUNTA(DROP(B2:B14,XMATCH(IF(B14=TRUE,FALSE,TRUE),B2:B14,0,-1)))
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Re: Count true / false contunuesly from down to up

    mam, i have current 2019 version.

  5. #5
    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,853

    Re: Count true / false contunuesly from down to up

    Please update your profile NOW.

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

    Re: Count true / false contunuesly from down to up

    In B16 copied across:

    =ROW(B14)-LOOKUP(2,1/(B2:B14=IF(B14=TRUE,FALSE,TRUE)),ROW(B2:B14))
    Attached Files Attached Files

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Count true / false contunuesly from down to up

    You could also use this array* formula in cell B16:

    =13-IF(B14=TRUE,MAX(IF(B2:B14=FALSE,ROW($A$1:$A$13))),MAX(IF(B2:B14=TRUE,ROW($A$1:$A$13))))

    *Note that an array formula needs to be confirmed using the key combination of Ctrl-Shift-Enter (CSE), rather than the usual Enter.

    Then copy the formula across to H16.

    Hope this helps.

    Pete

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Count true / false contunuesly from down to up

    A shorter version:

    =13-MAX(IF(B2:B14=NOT(B14),ROW($A$1:$A$13)))

    Still an array formula, so use CSE as previously advised.

    Hope this helps.

    Pete

  9. #9
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,422

    Re: Count true / false contunuesly from down to up

    Hi Pete_UK , post #8 you Can skip IF again
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Re: Count true / false contunuesly from down to up

    Dear Sir/ Mam,

    Actually I have big data, if I apply this formula in this sheet then the result is not coming. Is there a type mistake in my formula?
    Attached Files Attached Files

  11. #11
    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,853

    Re: Count true / false contunuesly from down to up

    Update your forum profile NOW!

  12. #12
    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,853

    Re: Count true / false contunuesly from down to up

    In B224 copied actross:

    =ROW(B222)-LOOKUP(2,1/(B2:B222=IF(B222="TRUE","FALSE","TRUE")),ROW(B2:B222))

    And update your forum profile NOW!

  13. #13
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Re: Count true / false contunuesly from down to up

    Thank you, getting correct results now..

  14. #14
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Re: Count true / false contunuesly from down to up

    profile updated

  15. #15
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,422

    Re: Count true / false contunuesly from down to up

    Pls try this formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  16. #16
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Count true / false contunuesly from down to up

    Excel 2021/365

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Excel 2019
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by DJunqueira; 03-28-2024 at 09:24 AM.

  17. #17
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,422

    Re: Count true / false contunuesly from down to up

    Hi DJunqueira , there was an error in the results here #VALUE!

    I don't have time to investigate. What is the reason behind Pete UK, post # 8 formula , It will work, but the following formula cannot be used
    Last edited by wk9128; 03-28-2024 at 09:44 AM.

  18. #18
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Count true / false contunuesly from down to up

    The TRUE and FALSE values in the larger table are actually text values. I used Ctrl-H (Find/Replace) twice to change TRUE to TRUE and FALSE to FALSE and these formulae both gave the correct answer:

    =221-MAX(IF(B2:B222=NOT(B222),ROW($A$1:$A$221)))

    =221-MAX((B2:B222=NOT(B222))*ROW($1:$221))

    Hope this helps.

    Pete

+ 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. [SOLVED] Count smallest two against a figure in another column and use logic to get true or false
    By MD PERVEZ KHAN in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-20-2015, 06:54 AM
  2. What is best to use for helper cells 0 or 1, typed true or false or =true =false
    By Gingermuppet in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2014, 10:41 PM
  3. [SOLVED] in this TRUE OR FALSE function, i want desired name instead of display true or false
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-15-2013, 06:44 PM
  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. Replies: 2
    Last Post: 09-06-2012, 03:23 PM
  6. Replies: 2
    Last Post: 09-06-2012, 01:19 AM
  7. Replies: 2
    Last Post: 09-06-2012, 01:19 AM

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