It happens that GS forgot to reset the temp counter...
Function GetMostWinnersRow() As Long
Dim n&, k&, i&, j& 'As Long
Dim sWinners As String
sWinners = InputBox("Enter the winning teams")
For i = 1 To 207
For j = 2 To 17
'Count number of cells with winners
If InStr(sWinners, Cells(i, j).Value) 0 Then k = k + 1
Next 'j
'Compare 'k' to current highest count (n) & store 'k' if greater
'and get the row number to return
If k n Then n = k: GetMostWinnersRow = i
k = 0 'reset for next row
Next 'i
End Function 'GetMostWinnersRow()
--
Garry
Free usenet access at
http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc