Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 129
  • Last Modified:

Counting No. of values in Arrays

I define an array of 10 items, say a[10].
I give for 3 arrays say a[0] = 38, a[3] = 980, a[7] = 98
The remaining arrays 7 of them are without values.
What I want is to get the count of number of arrays (with values) and in this case should give the count as 3.

Is there any function /user defined logic to do this one.
Anticipating a postive response from your end for this case.
Thankyou in advance for your help.
0
Favourites
Asked:
Favourites
1 Solution
 
clifABBCommented:
Nope, sorry.

The best you can do is:
nCount = 0
For nCnt1 = LBound(a) to UBound(a)
  If a(nCnt1) > 0 Then
    nCount = nCount + 1
  End If
Next nCnt1
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now