+ Reply to Thread
Results 1 to 3 of 3

How to autoupdate a list when source data changes

Hybrid View

  1. #1
    Registered User
    Join Date
    07-27-2016
    Location
    California, United States
    MS-Off Ver
    10
    Posts
    2

    How to autoupdate a list when source data changes

    Hi,

    I would really appreciate if someone could help me with this problem:

    I Have two lists on my worksheet:

    List 1 is a selection for a calculation basis, the entries are "Manual" and "Automatic"

    List 2 is dependent on the entries in List 1, as follows: =IF($A$1="Automatic",D2,Vendors), - - This syntax is entered in the List Source field of the data validation tab

    Where:
    A1 is the Output Parameter from List 1
    D2 is the value to show is I want an automatic calculation
    Vendors is the named range list to show if List 1 is set to "Manual"

    The list syntax works for both lists, when I select Automatic, the correct value populated, when I select Manual, the correct range appears in the List field, however, the output parameter fro List 2 does not automatically update unless I select it and bring the range up.

    Can someone help me figure out how to make the list auto update with the correct values for both Manual and Automatic?
    Last edited by Susan_Boland; 08-01-2016 at 07:46 PM. Reason: Add file

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to autoupdate a list when source data changes

    You would need a worksheet_change event watching for changes to cell A1, and based on when that cell changes, force a change into the cell where you List 2 resides. You didn't mention where that cell is, so I will use M1 as an example:
    Private Sub Worksheet_Change(ByVal Target As Range)
    
        If Not Intersect(Target, Range("A1")) Is Nothing Then
            Application.EnableEvents = False
            Select Case Range("A1").Value
                Case "Manual"
                    Range("M1") = "Make Selection..."
                Case "Automatic"
                    Range("M1").Value = Range("D2").Value
            End Select
            Application.EnableEvents = True
        End If
    
    End Sub
    Change those M1 references to the correct cells for List2.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    07-27-2016
    Location
    California, United States
    MS-Off Ver
    10
    Posts
    2

    Re: How to autoupdate a list when source data changes

    Thanks for the help!

    Unfortunately this code isn't firing and doesn't automatically update the fields in List 2, Any other thoughts?

    Thanks again in advance!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Data validation lists change source designation when list data is updated.
    By frenurks in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-28-2015, 06:52 AM
  2. [SOLVED] Autoupdate worksheets when entering data on a master - dependent on a dropdown selection
    By Keiralea in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-23-2013, 04:28 PM
  3. Replies: 0
    Last Post: 01-09-2013, 11:44 AM
  4. [SOLVED] set data validation source list
    By rana_shaker in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-14-2012, 03:06 AM
  5. Replies: 3
    Last Post: 07-20-2012, 09:52 AM
  6. Autoupdate rows in one sheet with data from another
    By Riosmitham in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-12-2011, 06:52 AM
  7. Source Data for List
    By ComcoDG in forum Excel General
    Replies: 2
    Last Post: 05-06-2008, 03:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1