Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Daniel
 
Posts: n/a
Default How to sort a drop-down list?

I have a worksheet (wsA) acting as a database with columns ID, Name and Amount.

I defined a name for each of these of columns.

On the other worksheet (wsB), I made a drop-down list for each of these
names using Data-Validation.

However, the items in the drop-down list is not sorted because my data in
wsA is not sorted and I don't want to sort it manually everytime I add a
record to wsA. I want it to be sorted because this is easier for user to
search for a particular record.

Is there a way to sort the items in the drop-down lists without using Macro?
If no, marco is fine too.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David McRitchie
 
Posts: n/a
Default How to sort a drop-down list?

Hi Daniel,
You would need a macro, but you could use a low maintenance macro
that sorts the list upon deactivation of the worksheet that the defined name
actually refers to. I would not suggest sorting upon change as the flipping
around of cells would confuse you.
http://www.mvps.org/dmcritchie/excel/event.htm

No specific macro for Private Sub Worksheet_Deactivate()
but you can use the example in
http://www.mvps.org/dmcritchie/excel...g.htm#activate
to give you an idea, or perhaps it as is..

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Daniel" wrote in message ...
I have a worksheet (wsA) acting as a database with columns ID, Name and Amount.

I defined a name for each of these of columns.

On the other worksheet (wsB), I made a drop-down list for each of these
names using Data-Validation.

However, the items in the drop-down list is not sorted because my data in
wsA is not sorted and I don't want to sort it manually everytime I add a
record to wsA. I want it to be sorted because this is easier for user to
search for a particular record.

Is there a way to sort the items in the drop-down lists without using Macro?
If no, marco is fine too.

Thanks.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple select from the drop down list in excel. list in one sheet and drop down in sriramus Excel Discussion (Misc queries) 5 October 27th 05 06:55 PM
changing value of a cell by selecting an item from a drop down list Bobby Mir Excel Worksheet Functions 6 June 8th 05 08:33 PM
Pull unique names for drop down list [email protected] Excel Discussion (Misc queries) 3 February 1st 05 10:23 PM
How to change fonts in drop down list Dennis Excel Discussion (Misc queries) 1 January 12th 05 01:49 PM
formatting drop down list dennis Excel Discussion (Misc queries) 2 January 11th 05 04:21 PM


All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"