Solved

Validation Lists Default value

Posted on 2013-05-10
8
325 Views
Last Modified: 2013-05-10
Morning all,

I have two validation list.   The second one is depended on the value in the first.  I was wondering if there was a way after the value in the first list is select that it would default the second list to the first item in the list and you could still change the value if needed.  

Thanks,
Montrof
0
Comment
Question by:montrof
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 39155449
You would have to use code for that. We'd need to see a workbook to provide details, really.
0
 
LVL 1

Author Comment

by:montrof
ID: 39155645
0
 
LVL 1

Author Comment

by:montrof
ID: 39155649
Attached is an example of the data.
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 39155858
You need to sort your list by region for your DV to work properly by the way (you still get duplicates).

Anyway, right-click the worksheet tab, choose View Code and then paste this in:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("D2")) Is Nothing Then
        On Error Resume Next
        Application.EnableEvents = False
        Range("D3").Value = Evaluate(Range("D3").Validation.Formula1)(1)
        Application.EnableEvents = True
    End If
End Sub

Open in new window

0
 
LVL 1

Author Comment

by:montrof
ID: 39155941
One thing I already have a Worksheet_Change event can you have multiple for one sheet?
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 39155983
No, you'll have to combine them.
0
 
LVL 1

Author Comment

by:montrof
ID: 39155991
This is the other even i have


Private Sub Worksheet_Change(ByVal Target As Range) more than 13 months
If Intersect(Target, Range("e2")) Is Nothing Then Exit Sub
If Target.Count > 1 Then Exit Sub
    If (Worksheets("List").Range("e6").Value - Worksheets("List").Range("e7").Value) > 396 Then
        Worksheets("List").Range("e3") = Worksheets("Parameters").Range("e161")
    End If
End Sub

Open in new window

0
 
LVL 1

Author Comment

by:montrof
ID: 39155995
could you show me how to combine them I posted the other event

Thanks,
montrof
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question