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
Solved

Validation Lists Default value

Posted on 2013-05-10
8
310 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
  • 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem with a moving column in Excel 6 39
Combine like values in a graph excel 2016 7 32
List Box Entries Excel 2010 5 29
Import text from rows into columns? 12 38
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
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.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

861 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