I'd like to sort some data alphabetically. The data is in a column, and as it's pulled in to the VBA program(?), it's stored in a Dictionary. Once the data has been pulled in, then the combobox is populated with the data from the Dictionary.
The data is text, and the column of data has repeating elements and blank cells. Copying it into the Dictionary removes the duplicates and blanks, but leaves me with something out of alphabetical order. The data is copied into the key field, and the item is 0. The code is based on code I found here: https://stackoverflow.com/questions/...83188#28483188 See below for what is in use now.
I am working with Excel 2016
I see a lot of people online asking how to sort things in Dictionaries, comboboxes, etc. I don't see much of the same code, nor even the same kind of code. Code posted more than a few years ago seems to have disappeared. I find it surprising there are no built-in sorting functions.
For example, this question http://www.excelforum.com/excel-prog...ictionary.html has a lot of code, most of which is difficult to read.
I've seen several people link to this page: http://spreadsheetpage.com/index.php..._unique_items/, but I don't know how a list is related to a Dictionary or Combobox.
The author of the code from the parralel dimension says that it returns an ArrayList, which is an object in java, but I don't know if he's using casual speech, or if that is an object name or object type: https://www.mrexcel.com/forum/excel-...lications.html
I came across this post, but again, the code is completely different than anything else. https://www.codeproject.com/tips/814...-integer-value
I will be sorting less than 1000 entries, so I don't necessarily need superlative Big O.
I am hesitant to build my own sort because its been a while since I did that in Java class, and I still don't know much about VBA. I'd rather not have to build or debug a sort algorithm either.
Please Login or Register to view this content.
Bookmarks