PDA

View Full Version : [SOLVED:] find listbox column Average



av8tordude
05-06-2020, 10:19 AM
The code below i found using google, but i have not been able to find anything that gets the average of a listbox column. Can someone assist me to getting the average of the



With lbxLots
For i = 0 To .ListCount - 1
dPrice = dPrice + .List(i, 2) 'Sum the 3rd column
Next i
End With

Artik
05-06-2020, 10:29 AM
Dim dAverange As Double

With lbxLots
For i = 0 To .ListCount - 1
dPrice = dPrice + .List(i, 2) 'Sum the 3rd column
Next i

dAverange = dPrice / .ListCount
End With
Artik

av8tordude
05-06-2020, 10:40 AM
Thank you Artik for your help:friends: