![]() |
Updating a Validation List
Hello,
Does anyone know how to update a validation list just by typing a new value into the cell with the list. Inotherwords, if I have a validation list in cell (a) that has apples, oranges and pears, if I type in bananas, I want that entry to fill my validation list. Thanx for your help |
Updating a Validation List
or possibly: <If you don't want to use worksheet events and code
You could use a named dynamic range to reference the list in the DV dialog. This will allow you to add/remove items randomly and the list automatically updates. This doesn't require any code or events procedures. ********** Here's how: ********** 1. Determine the number of possible entries that might be required for list items. 2. Define a local named range where the list will be located, having the determined number of cells. Call it "Fruits", for example. (It won't matter how many extra cells it contains) 3. Define a global name like "FruitsList", for example, that contains the following formula in its RefersTo box: =OFFSET(Fruits,0,0,COUNTA(Fruits),1) This creates a range name "FruitsList" that consists of the number of entries in Range("Fruits"). It will change size as items are added/removed, which is why it's called 'dynamic'. The above formula assumes there's no header included in the reference for "Fruits". If you want to include it in the range definition, then the formula should be: =OFFSET(Fruits,1,0,COUNTA(Fruits)-1,1) This will capture only the listed items below the header. 4. In the DV dialog, with 'List' selected, enter =FruitsList in the Ref Edit box. That's it! Regards, GS |
Updating a Validation List
There are sample files he
http://www.contextures.com/excelfiles.html Under 'Data Validation' To do this with formulas, look for 'Flexible Item List' Or to do it programmatically, look for 'Update Validation List' Dmorri254 wrote: Hello, Does anyone know how to update a validation list just by typing a new value into the cell with the list. Inotherwords, if I have a validation list in cell (a) that has apples, oranges and pears, if I type in bananas, I want that entry to fill my validation list. Thanx for your help -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
All times are GMT +1. The time now is 10:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com