Set of data with certain patterns - find next value after pattern occurs

BBXAXX

New Member
Joined
Dec 26, 2016
Messages
2
Hello, I have set of data in column like this for example:

1
0
1
0
0
1
1

1
0
1
1


Now, as you can see BOLD numbers is pattern for example pattern for last 3 numbers in given data set it: 0,1,1. I want to find next value in set of data IF my patterns occurs in this set of data. So in example above I want Excel to give me result: 1,because number "1" is the number that occurs after given pattern 0,1,1. I want Excel to count all "1" and "0" that occurs after given pattern.


I know that I can make another column that helps me in doing that, but I have so much data that my RAM memory can't keep up with all the "helper" columns so I need to find other solution I dont know maybe OFFSET or LOOKUP formula can help me to do this task?

I would love to hear any help from someone who can direct me into right path to solve that problem :)

Thank you very much in advance
BBXAXX
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hello, I have set of data in column like this for example:

1
0
1
0
0
1
1

1
0
1
1


Now, as you can see BOLD numbers is pattern for example pattern for last 3 numbers in given data set it: 0,1,1. I want to find next value in set of data IF my patterns occurs in this set of data. So in example above I want Excel to give me result: 1,because number "1" is the number that occurs after given pattern 0,1,1. I want Excel to count all "1" and "0" that occurs after given pattern.
Can you show us the result you want and tell us in what cell or cells you want it? I ask because the highlighted section is confusing to me... you say you want Excel to give you "1" as the answer, but then you go on to say you want a count of all "1" and "0" after the pattern (what follows the "1" you said originally you wanted as answer is, in fact, your pattern).
 
Last edited:
Upvote 0
I will explain this problem in screen below:

rIPlswM.png


Column A1:A22 have some binary numbers (0, 1). As you can see I highlighted numbers with GREEN fill color that match my pattern I want to find.
Column C5:C22 have formula as you can see in formula box, that CONCATENATE first four numbers in data set and check if this first four numbers matches my pattern.
If this first four numbers match my pattern, I want Excel to write NEXT number that is right after this pattern.

The biggest problem is that I can't do this this way because I have data set that have approximately 30.000 binary records in it, and my RAM memory can't handle that much of CONCANTENATE formula to count all NEXT values, after my pattern occurs.
I want someone to help me find other way without making HELPER columns, I want Excel formula, that in steps:

1. Search for pattern in data set..
2. IF pattern in data set matches my desired pattern, make AVERAGE of all values right after pattern occurs. So in example above my AVERAGE in cells C5:C22 = 0,66

I hope that I explain this in details so you know my problem, I need formula to do all the math stuff, I can't use helper columns like in example above.
Thanks in advance.
 
Upvote 0

Forum statistics

Threads
1,214,864
Messages
6,121,986
Members
449,058
Latest member
oculus

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