UBOUND Upper Bound of Array Dimension y = UBOUND(array (dimension)) Returns the highest subscript for a given dimension of a given array. array The name of an array. dimension The number of a dimension. The first dimension of an array is 1, the second is 2, and so on.