How to Get Array Length In Microsoft Excel

Hi, I have following text, in Excel in D5 Cell VB933 + VB19 + BB3 I am not able to get the length of Array; for example, I should get 3 on the sample text for VB933, VB19 & BB3 Not able to get the length of the array using Array.Length; can someone please help!


7 Answers
1-7 of  7
7 Answers
  • Use LEN Function with SUM

  • Length of an array:
     
    UBound(columns)-LBound(columns)+1
     
    UBound alone is not the best method for getting the length of every array as arrays in VBA can start at different indexes, e.g Dim arr(2 to 10)
     
    UBound will return correct results only if the array is 1-based (starts indexing at 1 e.g. Dim arr(1 to 10). It will return wrong results in any other circumstance e.g. Dim arr(10)

MS Excel

Didn't get the answer.
Contact people of Talent-MS Excel directly by clicking here