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
 
Okay, based on your explanation and examples, I believe this formula will do what you want...

=COUNTIF(A2,"*1*0*1*")=0
Couldn't achieve

ConcOutput RequiredRickbebo021999
11011​
FALSE​
TRUE​
TRUE​
11100​
TRUE​
TRUE​
FALSE​
11111​
TRUE​
TRUE​
TRUE​
10110​
FALSE​
TRUE​
TRUE​
11101​
FALSE​
TRUE​
FALSE​
10111​
FALSE​
TRUE​
FALSE​
11110​
TRUE​
TRUE​
FALSE​
10000​
TRUE​
TRUE​
TRUE​
10100​
FALSE​
TRUE​
TRUE​
10001​
FALSE​
TRUE​
FALSE​
11000​
TRUE​
TRUE​
FALSE​
11001​
FALSE​
TRUE​
TRUE​
10101​
FALSE​
TRUE​
FALSE​
10010​
FALSE​
TRUE​
FALSE​
11010​
FALSE​
TRUE​
FALSE​
10011​
FALSE​
TRUE​
FALSE​
01011
FALSE​
FALSE​
FALSE​
01000
TRUE​
TRUE​
FALSE​
01010
FALSE​
FALSE​
FALSE​
01111
TRUE​
TRUE​
FALSE​
01110
TRUE​
TRUE​
TRUE​
01100
TRUE​
TRUE​
FALSE​
01001
FALSE​
FALSE​
FALSE​
01101
FALSE​
FALSE​
FALSE​
00111
TRUE​
TRUE​
FALSE​
00100
TRUE​
TRUE​
TRUE​
00101
FALSE​
FALSE​
FALSE​
00110
TRUE​
TRUE​
FALSE​
00010
TRUE​
TRUE​
FALSE​
00011
TRUE​
TRUE​
FALSE​
00001
TRUE​
TRUE​
TRUE​
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
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).
Basically , consecutive 0 and 1 would become FALSE
 
Upvote 0
When I test my formula against your examples, I get the same results you show that you want. Did you adjust the cell reference in my formula to match whatever cell your first value is in?
 
Upvote 0
When I test my formula against your examples, I get the same results you show that you want. Did you adjust the cell reference in my formula to match whatever cell your first value is in?
Nope I didn’t adjust anything
 
Upvote 0
Then you needed to change the A2 in my formula to A1 (you did not tell us where the first cell was orginally so I had guessed at A2).

This formula should work for you...

=COUNTIF(A1,"*1*0*1*")=0
 
Upvote 0
This is testing result at my end, in fact my formula match 100%, but Rick's got 4 fails
Capture.JPG
 
Upvote 0
This is my approach:
EITHER (0 then 1) OR (1 then 0 ) => TRUE
If both: (0 then 1) AND (1 then 0 ) => FALSE
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,545
Members
449,089
Latest member
davidcom

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