Consulting

Results 1 to 3 of 3

Thread: find listbox column Average

  1. #1

    find listbox column Average

    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

  2. #2
    VBAX Mentor
    Joined
    Dec 2008
    Posts
    404
    Location
    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

  3. #3
    Thank you Artik for your help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •