Sub macro()
Dim i As Integer
Dim maxScore As Integer
Dim k As Integer
i = 1
maxScore = 0
Do While Range("A" & i).Value <> ""
If Range("A" & i).Value > maxScore Then
maxScore = Range("A" & i).Value
k = i
End If
i = i + 1
Loop
Range("B1").Value = maxScore
Range("B2").Value = k
End Sub


コメント