Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jhollin1138
 
Posts: n/a
Default Refresh a Validation List?

I have a spreadsheet that has 2 Validation lists. The first list is to
select an item for a group (example: animal, vegetable or mineral). The
second list is dependant on the first list and displays options available
for the selected group (example: animal is selected in list 1; cat, monkey,
horse, etc. is available in list 2). I have this part of the spreadsheet
working, put when I change the selected item in list 1, list 2 still
displays the last item selected prior to selecting a new item in Validation
list 1. Is there a way to refresh list 2 (or unselect the previously
selected item), after list 1 is changed?

TIA,

----------
Jim H


  #2   Report Post  
Jim Rech
 
Posts: n/a
Default

I believe you'd have to use a macro to get the result you want. The sheet's
change event handler would have to see if the first validation cell is the
one that triggered it and, if so, change the validation list of the second,
as well as its contents.

--
Jim Rech
Excel MVP
"jhollin1138" wrote in message
...
|I have a spreadsheet that has 2 Validation lists. The first list is to
| select an item for a group (example: animal, vegetable or mineral). The
| second list is dependant on the first list and displays options available
| for the selected group (example: animal is selected in list 1; cat,
monkey,
| horse, etc. is available in list 2). I have this part of the spreadsheet
| working, put when I change the selected item in list 1, list 2 still
| displays the last item selected prior to selecting a new item in
Validation
| list 1. Is there a way to refresh list 2 (or unselect the previously
| selected item), after list 1 is changed?
|
| TIA,
|
| ----------
| Jim H
|
|


  #3   Report Post  
Jason Morin
 
Posts: n/a
Default

Try this macro. It assumes the first list (group) is in
A1 and the dependent list is in B1:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.[A1]) Is Nothing Then
Application.EnableEvents = False
Me.[B1].Value = ActiveWorkbook.Names(Target.Value).Value
Application.EnableEvents = True
End If
End Sub

---
To use, right-click on the worksheet tab, select "View
Code", and paste in the code above. Press ALT+Q to exit.

HTH
Jason
Atlanta, GA

-----Original Message-----
I have a spreadsheet that has 2 Validation lists. The

first list is to
select an item for a group (example: animal, vegetable

or mineral). The
second list is dependant on the first list and displays

options available
for the selected group (example: animal is selected in

list 1; cat, monkey,
horse, etc. is available in list 2). I have this part

of the spreadsheet
working, put when I change the selected item in list 1,

list 2 still
displays the last item selected prior to selecting a new

item in Validation
list 1. Is there a way to refresh list 2 (or unselect

the previously
selected item), after list 1 is changed?

TIA,

----------
Jim H


.

  #4   Report Post  
jhollin1138
 
Posts: n/a
Default

Jason

That works, thanks for the help!

----------
Jim H


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
Auto scroll down data validation list [email protected] Excel Discussion (Misc queries) 4 January 28th 05 06:44 PM
Validation List and VLookup are ackting strange Jasper Excel Worksheet Functions 1 January 24th 05 01:49 PM
list validation using list validation... Patrick G Excel Worksheet Functions 1 December 21st 04 12:37 AM
Validation list behaving strangely in 2003 Danny J Excel Worksheet Functions 2 December 8th 04 08:00 AM
Validation - List - Separate Worksheet J. Osborne Excel Worksheet Functions 1 October 28th 04 04:23 PM


All times are GMT +1. The time now is 09:16 AM.

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

About Us

"It's about Microsoft Excel"