Excel Function with range selection.
Public Function abc(a As Range) As String
Dim b As Variant
b = a
'For Array Dimentions size 1 = row; 2 = col
x = UBound(b, 1) - LBound(b, 1) + 1
y = UBound(b, 2) - LBound(b, 2) + 1
z = x & " " & y
abc = z
End Function
Finally, Assign out to function name variable (abc as string), to get output in cells.