Hello @codedreamer,
Due to firewall restrictions on my end I am not able to see your sample file.
However, I interpreted your question as follows:
If two adjacent cells have the same value, color it yellow.
If two adjacent cells have ascending numeric values, color it another color.
To keep things simple, I have assumed that your data starts in column B (leaving col A empty). For the following formula, I have also assumed your data range starts in cell B1.
Select your entire data range (e.g. B1:E8), then add the following conditional format formulas.
=OR(B1=A1,B1=C1)
Set the fill for this rule to be "yellow" color.
For the same data range, add the following conditional format formula:
=AND(NOT(ISBLANK(A1)),A1<B1)
Set the fill for this rule to be "blue" (or some other color).
Apply the rules.
In your sample data (from your original post), I got the following results:
[pre]
Code:
Y Y 1 B
4 2 Y Y
2 1 Y Y
3 2 B 2
Y Y 3 B
Y Y Y B
1 B B B
2 B Y Y
[/pre]
Where Y stands for yellow coloring, B stands for blue coloring, and a numeric value indicates no coloring.
In my setup, the Yellow rule was first, and Blue rule second. That controls how the cells are colored.
Cheers,
Sajan.
P.S. Re-reading your second post, you indicate that you actually want the counts for these. If you can confirm that the above approach is what you were after, we can come up with the formulas to count the cells.