LoginSignup
1
1

More than 3 years have passed since last update.

Excelで配列範囲をしらべる関数

Posted at

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
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1