Function used:
Function fmax(num1 As Double, num2 As Double, num3 As Double, num4 As Double, num5 As Double, num6 As Double, num7 As Double, num8 As Double) As Double
If num1 > num2 Then
fmax = num1
Else
fmax = num2
End If
If fmax < num3 Then
fmax = num3
End If
If fmax < num4 Then
fmax = num4...