Sequence true or false

James Clear

Board Regular
Joined
Jul 12, 2021
Messages
139
Office Version
  1. 365
  2. 2016
  3. 2013
  4. 2010
Platform
  1. Windows
I would like to have answer other than v lookup

If sequence is 01111 - False , 10111- false, 11111- True , 11011 - false
 
Hi,

You didn't explain your logic behind your TRUE/FALSE requirements, so this is my guess, see if this works for you:

Book3.xlsx
AB
101111FALSE
210111FALSE
311111TRUE
411011FALSE
511100TRUE
Sheet941
Cell Formulas
RangeFormula
B1:B5B1=ISODD(LEN(SUBSTITUTE(A1,"0","")))

11110 = This should come as a True situation
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
I am not sure what your reluctance is in giving a clear explanation of what you consider a sequence to be, especially in light of all the mis-guessing taking place (kind of ironic I might add given your last name). I am not sure, but it now appears that you consider a sequence to be one or more 1's followed by only 0's thereafter. If that is correct, then give this formula a try...

=(COUNTIF(A1,"*01*")=0)*(A1<>"00000")=1

If my guess is wrong, then I'll wait until either someone guesses what you want correctly or you simply tell us what you consider a sequence to be.
 
Upvote 0
I am not sure what your reluctance is in giving a clear explanation of what you consider a sequence to be, especially in light of all the mis-guessing taking place (kind of ironic I might add given your last name). I am not sure, but it now appears that you consider a sequence to be one or more 1's followed by only 0's thereafter. If that is correct, then give this formula a try...

=(COUNTIF(A1,"*01*")=0)*(A1<>"00000")=1

If my guess is wrong, then I'll wait until either someone guesses what you want correctly or you simply tell us what you consider a sequence to be.
Ok Rick , let me explain in details

In the below example - Let us Customers were given loan for the 5 months

In the first example - Customer was present from Aug to Sep and absent in Nov and again present in Dec so this should come as False coz it's practically not possible

Whereas , 11110 - This is possible since it's possible that in the month of Nov his loan was closed already and hence he was not present

Centre NameName of BCStateBC Branch CodeAug'21Sep'21Oct'21Nov'21Dec'21Combination
ABCAKARNATAKAAB2AvailableAvailableAvailableNot AvailableAvailable
11101​
PQRAKARNATAKAAB3AvailableAvailableNot AvailableNot AvailableAvailable
11001​
MNPAKARNATAKAAB4AvailableAvailableNot AvailableNot AvailableAvailable
11001​


So Answers should be like below


ConcStatus
11011​
FALSE​
11100​
TRUE​
11111​
TRUE​
10110​
FALSE​
11101​
FALSE​
10111​
FALSE​
11110​
TRUE​
10000​
TRUE​
10100​
FALSE​
10001​
FALSE​
11000​
TRUE​
11001​
FALSE​
10101​
FALSE​
10010​
FALSE​
11010​
FALSE​
10011​
FALSE​
1011​
FALSE​
1000​
TRUE​
1010​
FALSE​
1111​
TRUE​
1110​
TRUE​
1100​
TRUE​
1001​
FALSE​
1101​
FALSE​
00111
TRUE​
00100
TRUE​
00101
FALSE​
00110
TRUE​
00010
TRUE​
00011
TRUE​
00001
TRUE​
 
Upvote 0
01011FALSE
01000TRUE
01010FALSE
01111TRUE
01110TRUE
01100TRUE
01001FALSE
01101
Forgot to mention one zero at starting position
 
Upvote 0
Ok Rick let me try and come back to you soon. Thanks for your assistance with this matter
 
Upvote 0
Okay, based on your explanation and examples, I believe this formula will do what you want...

=COUNTIF(A2,"*1*0*1*")=0
 
Upvote 0
is this the logic:
list of 1 then 0 (decreasing) or 0 then 1 (increasing)? Single direction only.

=ISERROR(SEARCH("10",A1)+SEARCH("01",A1))
 
Upvote 0
Solution
is this the logic:
list of 1 then 0 (decreasing) or 0 then 1 (increasing)? Single direction only.

=ISERROR(SEARCH("10",A1)+SEARCH("01",A1))
I get 3 wrong results for your formula when tested against the additional examples the OP posted in Message #16.

I think he wants a FALSE if there is one or more 0's between two 1's (see the formula I posted).
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,040
Members
449,063
Latest member
ak94

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top