+ Reply to Thread
Results 1 to 6 of 6

Remove duplicates and sort data for populating a combobox using VBA

  1. #1
    Forum Contributor
    Join Date
    07-23-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    211

    Remove duplicates and sort data for populating a combobox using VBA

    Hi all

    I am trying to populate a combobox on a userform with data list from a sheet (strSheetName). I want to first remove duplicates and blanks from the list, sort the data in decending order and then populate a combobox.

    I have the code to remove duplicates and populate the combobox as shown below, but I don't know how to amend it to remove blanks and to sort it. Can anyone help advise?

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    07-23-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    211

    Re: Remove duplicates and sort data for populating a combobox using VBA

    Any suggestions?

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Remove duplicates and sort data for populating a combobox using VBA

    Other method
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    07-23-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    211

    Re: Remove duplicates and sort data for populating a combobox using VBA

    Jindon

    You have come to my rescue again! Works much better now, but it's giving list from z to a. How can I make it a to z?

    Thanks very much

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Remove duplicates and sort data for populating a combobox using VBA

    A-Z...
    Remove
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    07-23-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    211

    Re: Remove duplicates and sort data for populating a combobox using VBA

    Sorted! (pardon the pun!)

    Thanks, friend

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1