PC Review


Reply
Thread Tools Rate Thread

Dynamic dropdown?

 
 
=?Utf-8?B?cHBzYQ==?=
Guest
Posts: n/a
 
      11th Sep 2007
Hi--

I'd like to create a dynamic dropdown in which the contents of the dropdown
(source) is all the values (unique) in the column where the dropdown
operates. If the user enters a new value, one that isn't yet in the column,
I'd like that value to be added to the dropdown next time. So, let's say that
all the cells from B1 to B50 would have a dropdown. Initially, before any
values are entered into that range, the dropdown would be empty. Then, let's
say the user enters "Hello" into B1. When they go to B2, the dropdown would
contain one option: Hello. Now they can either select Hello from the dropdown
in B2 or they can type in another value, let's say, "World". Let's say they
enter "World". Now when they go to B3, the dropdown will have Hello and World
listed. And so on...

Also, let's say the user enters "World" from the dropdown into cell B3. Now
B1 is Hello, and B2 and B3 are World. The dropdowns in the range would not
list World twice!

Is there a way to do this directly in the spreadsheet without using forms?

Thanks!
 
Reply With Quote
 
 
 
 
Ron Coderre
Guest
Posts: n/a
 
      11th Sep 2007
If a NON-VBA solution is acceptable, see if something like this helps.
In this example, the input list begins in B2. There is a formula driven
list in Col_D that will build the list.

First...some Range Names

Names_in_Workbook: LU_FlexibleList
Refers to:
=InputSheet!$D$2:INDEX(InputSheet!$D:$D,COUNTIF(InputSheet!$D:$D,"?*")+COUNT(InputSheet!$D:$D),1)

Names_in_Workbook: rngUserInput
Refers to: =InputSheet!$B$2:$B$50

Next, prep the list areas
D1: (column heading, eg List Items)
D2: (manually enter the first item to appear in the dropdown list, eg Hello)

Enter this ARRAY FORMULA (committed with Ctrl+Shift+Enter, instead of just
Enter) in cell
D3:=INDEX(rngUserInput,MATCH(TRUE,ISERROR(IF(ISBLANK(rngUserInput),FALSE,MATCH(rngUserInput,$B$2:$B2,0))),0),1)
(Note: D3 will return #N/A...that is expected)

Copy D3 and paste into D4 and down as far as you think you'll need

B1: Inputs
Select from B2:B50
<data><validation>
Settings_Tab:
Allow: List
Source:
=INDEX(LU_FlexibleList,1):INDEX(LU_FlexibleList,COUNTIF(LU_FlexibleList,"<>#N/A"))
Error_Alert_Tab:
UNcheck: "Show error alert after invalid data is entered."
Click [OK]

To use the list....either click the dropdown and select an item...OR...just
type a new item. It will appear only once in the DV list.

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)



"ppsa" <(E-Mail Removed)> wrote in message
news:51569F68-2989-4622-8A42-(E-Mail Removed)...
> Hi--
>
> I'd like to create a dynamic dropdown in which the contents of the
> dropdown
> (source) is all the values (unique) in the column where the dropdown
> operates. If the user enters a new value, one that isn't yet in the
> column,
> I'd like that value to be added to the dropdown next time. So, let's say
> that
> all the cells from B1 to B50 would have a dropdown. Initially, before any
> values are entered into that range, the dropdown would be empty. Then,
> let's
> say the user enters "Hello" into B1. When they go to B2, the dropdown
> would
> contain one option: Hello. Now they can either select Hello from the
> dropdown
> in B2 or they can type in another value, let's say, "World". Let's say
> they
> enter "World". Now when they go to B3, the dropdown will have Hello and
> World
> listed. And so on...
>
> Also, let's say the user enters "World" from the dropdown into cell B3.
> Now
> B1 is Hello, and B2 and B3 are World. The dropdowns in the range would not
> list World twice!
>
> Is there a way to do this directly in the spreadsheet without using forms?
>
> Thanks!



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Dropdown difficulties =?Utf-8?B?QnJhZA==?= Microsoft Excel Misc 0 31st Jan 2007 03:40 PM
Dynamic Dropdown Part II =?Utf-8?B?QnJhZA==?= Microsoft Excel Misc 2 30th Jan 2007 09:46 PM
dynamic dropdown lists Anthony Microsoft ASP .NET 0 13th May 2005 04:45 PM
dynamic width of dropdown ? =?Utf-8?B?ZGluZXNo?= Microsoft ASP .NET 2 8th May 2004 09:06 PM
Dynamic Dropdown in DataGrid Niks Microsoft ASP .NET 4 17th Jan 2004 08:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:21 PM.