Thanks for the reply.

I am trying to upload a file but keeps getting an error message. See attached screen shot from data of 20 shoes. I have 25,000 of these baccarat shoes. If interested I can forward the sheet to your email address.

If you are not familiar with Baccarat, it is a Casino card game where the outcome is either Player (P) or Banker (B) thus all the “P” and “B” values. Each shoe has on average of about 80 hands.

The “Patterns” I am referring to only occurs in rows 1 and 2.

There are 4 patterns:

1 - P,B,P or B,P,B example A1:C1 (1st message)

2 – The next pattern is P,P,B,B or B,B,P,P example C1, C2, D1, D2

P B

P B

3 – The 3rd pattern is P,B,B or B,P,P example E1, F1,F2. This pattern can only occur after a column with at least 2 rows of data example D1, D2

P B

B

4 – The 4th pattern is P,B or B,P example G1,H1. This pattern can only occur after a single column with at least 2 rows. Examle can be after F1, F2, but cannot be after D1, D2 as D1, D2 has data before it of more than 2 rows C1, C2, C3.

P B

When I am doing it manually I convert sheet 1 to the shoe format in sheet 2.

I start at A1 and see if I have any of the 1st three patterns.

Example:

If I have data in A1, A2, B1, B2 then the pattern in the 2nd example is made.

P B

P B

Now I only have 3 more patterns to look for and ignore the pattern I have just made should it occur again. If the next data is C1, D1, D2 the pattern in the 3rd example is made

P B

B

If this pattern occurs again I will ignore it, at this point I am only looking for 2 more patterns P B P and B P

When I have found all 4 patterns, the cycle starts all over again. Normally I would look for patterns up to 45 hands into the shoe (the total of all the “P” and “B”)

Also if 25 hands pass without making at least 3 patterns then the shoe will be rejected and I will move on to the next shoe.

I hope this will give you some idea of what I am looking for. Unfortunately without being able to upload the spread sheets it is very hard to explain.

Is it possible to do in excel or is it better to go the C++ route?

[File attached by Admin]