Hi,

You can use the COUNTIF function but this will only be accurate if the Station 1 has unique entries. If it does you can put an extra column of these totals for each station column (a bit messy) and sum those case match cells.

=IF(COUNTIF(B:B,$A2)>1,1,COUNTIF(B:B,$A2))

That will count station 2s case match and if there is more than one it will return 1, which I think is what you want. Fill it down to the bottom and across to the last station. Then sum them in the case match fields.

If the data does have duplicates then you may be able to create a custom function using VBA, which I can't do.

HTH,

Roly