Counting Strings in an Array
Given an array, you want to count the numberof rows that are NOT empty:
correct?
Try:
Function xx(ByVal StringArray As Variant) As Integer
StringArray = Join(StringArray, ",")
While 0 < InStr(StringArray, ",,")
StringArray = Replace(StringArray, ",,", ",")
Wend
StringArray = Split(StringArray, ",")
xx = UBound(StringArray)
End Function
"ExcelMonkey" wrote:
How do you count strings within an array?
Thanks
|