Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default AutoUpdate/Recalc of Dependant Data Validation Lists??

Can anyone give me insight into how I might be able to get Excel to
recalc or update a validation list that is dependant on a different
one? Currently, I have a primary list and a secondary list. The
secondary is using the indirect function to refer to the primary. The
problem is that when the primary is changed, the secondary stays on an
option that is not current until you actually click on the dropdown,
at which point it only shows options from the updated primary. I
would at least like to be able to write a script or modify a function
so that the secondary blanks out if the primary is changed at any
point. I've tried writing a UDF using a case select, which
appropriately updates when the dependant cell changes, but the data
validation allow formula gives me a "A named range you specified does
not exist" error. Any suggestions?

Regards,
Brian

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default AutoUpdate/Recalc of Dependant Data Validation Lists??

You could use a macro so that each time the "parent" cell changes, the child
cells gets reset to "".

If you want to try, right click on the worksheet tab that should have this
behavior. Select view code and paste this code in the code window.

Change the range to what you need (I used A1). And I cleared .offset(0,1) (B1).

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("a1")) Is Nothing Then
Exit Sub
End If
Application.EnableEvents = False
Target.Offset(0, 1).Value = ""
Application.EnableEvents = True
End Sub



wrote:

Can anyone give me insight into how I might be able to get Excel to
recalc or update a validation list that is dependant on a different
one? Currently, I have a primary list and a secondary list. The
secondary is using the indirect function to refer to the primary. The
problem is that when the primary is changed, the secondary stays on an
option that is not current until you actually click on the dropdown,
at which point it only shows options from the updated primary. I
would at least like to be able to write a script or modify a function
so that the secondary blanks out if the primary is changed at any
point. I've tried writing a UDF using a case select, which
appropriately updates when the dependant cell changes, but the data
validation allow formula gives me a "A named range you specified does
not exist" error. Any suggestions?

Regards,
Brian


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default AutoUpdate/Recalc of Dependant Data Validation Lists??

I have actually tried this. I believe that the problem with this is
that excel does not see a change in a validation list box as a cell
value change. There is also a way to do the same thing whenever the
validation box is clicked, but I dont want the values resetting
everytime one of these parent lists (there are about 20 of them) is
clicked, only when one is changed.

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
Data Validation - Dependant Lists TonyK Excel Discussion (Misc queries) 3 February 9th 09 05:56 PM
Data Validation - dependant Lists TonyK Excel Discussion (Misc queries) 1 February 9th 09 04:27 PM
Dependant Lists (Data Validation) FARAZ QURESHI Excel Discussion (Misc queries) 7 March 12th 08 04:58 PM
Data Validation w/ Dependant Lists on seperate Wookbooks WDrummond Excel Worksheet Functions 2 March 7th 08 06:03 PM
Data Validation Dependant Lists andyp161[_5_] Excel Programming 3 September 14th 04 12:43 AM


All times are GMT +1. The time now is 04:30 PM.

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"