ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sort list into alphabetical order (https://www.excelbanter.com/excel-programming/301270-sort-list-into-alphabetical-order.html)

Jako[_18_]

Sort list into alphabetical order
 
I have a data list called "AUDITORS" going from cell A1:A3 which is th
RowSource on a Listbox.

Could someone please suggest code that would do the following:

a: Automatically resort the list into alphabetical order prior t
calling it for the Listbox population.

b: Allow me to Add to the List via the listbox and rename as "AUDITORS
if the item name isn't stored on the list.

Note i have used this code to name the range at the moment.

Range("A2").Select
Range(ActiveCell, ActiveCell.End(xlDown)).Select
Selection.Name = "AUDITORS"

Thanks in advance

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

Sort list into alphabetical order
 
See John Walkenbach's site:

http://www.j-walk.com/ss/excel/tips/tip47.htm
Filling a ListBox With Unique Items

As far as I know, you can't type in an item in a listbox

Perhaps you mean a combobox.


You could just redefine your range as you are doing and run John's code on
that range. You could use the Click event of the combobox to see if the
item is in the list and if not, do the above.

--
Regards,
Tom Ogilvy


"Jako " wrote in message
...
Also i forgot to put on :

c: Remove any duplicated entries

Many thanks


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 07:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com