Sub total()
Dim i As Integer, j As Integer, k As Integer, total As Long
Min = 9 ^ 9
total = 0
Range("H7:H10").Delete
For i = 4 To 6
For j = 4 To 6
If j <> i Then
For k = 4 To 6
If k <> j And k <> i Then
total = Cells(7, i).Value + Cells(8, j).Value + Cells(9, k).Value
If total < Min Then Min = total: Cells(7, 8) = Cells(7, i): Cells(8, 8) = Cells(8, j): Cells(9, 8) = Cells(9, k): Cells(10, 8) = total
End If
Next
End If
Next
Next
End Sub