Results 1 to 1 of 1
  1. #1
    Join Date
    May 2012
    Posts
    1

    Unanswered: Listbox1 unique counts with multiple condition

    I have listbox being populated on worksheet with column counts 5 with property set to multiselect.Its working fine. What i wish to, when user selects the multiple rows in listbox, the msg box / lable caption needs to generate to count the unique values if listbox selected item with multiple criteria of column 3, 4 & 5.
    e.g.

    Sl. # Bno Vari Flavour Des Date
    101 AD-01 CocaCola Sprite 13/04/2012
    102 AB02 Pepsi Mango 13/04/2012
    103 AD-02 ThumpUp Lime 13/04/2012
    104 AB03 Pepsi Orange 13/04/2012
    105 AD-03 Pepsi Mango 13/04/2012
    106 AB04 CocaCola Sprite 13/04/2012
    107 AD-04 ThumpUp Lime 13/04/2012
    108 AB05 ThumpUp Lime 13/04/2012
    109 AD-05 CocaCola Sprite 13/04/2012
    and so on………………….
    The result should be

    Date Vari Flavour Counts
    13/04/2012 CocaCola Sprite 3
    ThumpUp Lime 3
    Pepsi Orange 1
    Pepsi Mango 2

    like pivot results in messagebox And should send a notification thru mail of the above summery..
    Any help………….
    This is ongoing process, once the mail send the new list will be added and the same process will be done by user.
    Till now i have listed out the results in follwing manner
    :with ListBox1
    For i = 0 To .ListCount - 1
    If .Selected(i) = True Then
    msg = msg & .List(i) & " - " & .List(i, 2) & vbTab & Trim(.List(i, 3)) & vbNewLine
    (Here i want instead of individual lines, the summery report should pop up)
    End If
    Next i
    End With
    MsgBox("Summery:" & vbNewLine & msg )
    VD
    Attached Thumbnails Attached Thumbnails untitled.bmp  
    Last edited by VikramD; 05-08-12 at 08:29. Reason: Attachments of the desired report

Posting Permissions

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