Function Maxi(plage As Range)
Dim t, m, s, i&, j&, x
If plage.Count = 1 Then
ReDim t(1 To 1, 1 To 1)
t(1, 1) = plage.Value
Else
t = plage.Value
End If
m = -1E-99
For i = 1 To UBound(t)
For j = 1 To UBound(t, 2)
s = Split(t(i, j))
For Each x In s
If IsNumeric(x) Then If CDbl(x) > m Then m = CDbl(x)
Next x
Next j
Next i
If m = -1E-99 Then Maxi = "" Else Maxi = m
End Function
Sub Test()
Dim resultat
resultat = Maxi(Range("A1:B25"))
MsgBox "Maxi de la plage A1:B25 = " & resultat, vbInformation
End Sub