Excelの1次元配列、2次元配列、SPILL、Range、テーブル(ListObject)のLBound,UBoundをしらべる関数です。
(A1) =LUB(T14#) ' 1-3,1-6:Range
(A2) =LUB(NA_) ' 1-31,1-21:Range T NA_
(A3) =LUB(A_("1 2 3")) ' 1-3:Variant()
Function LUB(R, Optional S = "") ' LOW-UP BOUND
On Error Resume Next
V = R
S = CC(S, LBound(V, 1), "-", UBound(V, 1))
S = CC(S, ",", LBound(V, 2), "-", UBound(V, 2))
S = CC(S, ":", TNAME(R))
If ¬(R.ListObject Is Nothing) Then S = CC(S, " T ", R.ListObject.Name)
LUB = S
End Function
Function ¬(A)
¬ = Not (A)
End Function
Function A_(V, Optional S = "")
A_ = Split(V, " ")
End Function