Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default 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

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
Create auto updating data validation list from all worksheet names fryguy Excel Worksheet Functions 7 December 11th 07 08:59 PM
Updating Data in Validation Lists kivikatz Excel Worksheet Functions 7 April 8th 07 12:22 AM
Validation (Drop down list vs simple text length validation) Bob Phillips[_6_] Excel Programming 2 April 27th 04 07:47 PM
Validation (Drop down list vs simple text length validation) Jason Morin[_2_] Excel Programming 1 April 27th 04 04:56 PM
Validation (Drop down list vs simple text length validation) Pete McCosh Excel Programming 0 April 27th 04 03:49 PM


All times are GMT +1. The time now is 12:27 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"