Why not ...
Option Explicit
Sub test()
Dim arr(1 To 10) As String
Dim i As Long, j As Long
arr(1) = "mackeral"
arr(2) = "Tuna"
arr(3) = "Salmon"
arr(4) = "Salmon"
arr(5) = "Cod"
arr(6) = "mackeral"
arr(7) = "Tuna"
arr(8) = "Cod"
arr(9) = "Salmon"
arr(10) = "Cod"
For i = LBound(arr) To UBound(arr) - 1
For j = i + 1 To UBound(arr)
If arr(i) = arr(j) Then
MsgBox i & " = " & j & " = " & arr(j)
End If
Next j
Next i
End Sub
There are ways to do this faster, but this is the simplest approach
Looking at the stated final objective, you could use AVERAGEIF() function