View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Varun Varun is offline
external usenet poster
 
Posts: 37
Default Compare the number of elements in two different arrays

Guys,

I have two arrays, namely A and B - both have been dimensioned as follows
for unavoidable reasons:

Dim A(1 to 100) As Variant
Dim B(1 to 100) As Variant

The arrays have different number of elements in them i.e. A has 4 elements,
as in
A(1), A(2), A(3), A(4) and B has 2 elements, as in B(1), B(2). Note that
since I have declared both arrays from 1 to 100, A(5)..A(100) = "" and
likewise B(3)...B(100 = "" i.e. rest aray values are empty strings.

How do I compare the number of elements? i.e. since A has 4 non empty
elements and B has 2 non empty elements, I want to perform this check.

Any pointers are appreciated. Thanks.