View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Naomi Naomi is offline
external usenet poster
 
Posts: 26
Default Arrays in User defined functions

Hi,
I have the following in a function that is essentially the conditional sum,
counting the number of occasions when one column has the value AM in it and
the other has the date Curr_month. Is there any way of doing this so that it
runs faster? Can array functions be used in VB?

dim AM as string
dim Curr_month as date
dim meets, count_meetings as integer

If Sheets("DATA").Cells(i, 2).Value = AM And Sheets("DATA").Cells(i,
5).Value = Curr_month Then
meets = meets + 1
Else
End If


i = i + 1
Loop
Count_meetings = meets