Option Explicit
Sub Test()
Dim Rng As Range
Set Rng = [A1:a10]
MsgBox Mafonction(Rng)
MsgBox Mafonction(Rng.Rows)
MsgBox Mafonction(Rng.Columns)
End Sub
Function Mafonction(ByVal Rng As Range) As String
Dim LMax As Long, CMax, L1 As Long, C1 As Long
LMax = Rng.Rows.Count
CMax = Rng.Columns.Count
L1 = Rng(1).Rows.Count
C1 = Rng(1).Columns.Count
Mafonction = Choose(1 - 2 * (L1 > 1) - (C1 > 1), _
LMax * CMax & " cells", _
LMax & " lignes de " & CMax, _
CMax & " colonnes de " & LMax)
End Function