hi there

I am trying to compare the contents of cells in a column working from the top of the column downwards.

Any cell in Column A is given a score of +1
If cell below is the same as the cell selected(where the cursor is) then the score is +1.
This gives a total score of +2
We then move to the cell below and compare again. If the cell is the same then +1 is added - this now gives +3 because three cells have the same content.

However if the cell below is different then the score for this cell below is 0 and total score is written in the cell to the right of the selected cell and in this case the total score +2 is written.

An example is taken from excel sheet below.
Column A Column B - Total score
PJJ24 1
PKB18
PKB18 2
PKC01 1
PJD13
PJD13
PJD13 3
PJD14 1
PQQ12 1
PJJJ55
PJJJ55 2

Many Thanks