+ Reply to Thread
Results 1 to 4 of 4

Can you Automatically Update Formulas and Data Validation Between 2 cells in Excel Using V

  1. #1
    Registered User
    Join Date
    12-15-2024
    Location
    Muscat, Oman
    MS-Off Ver
    2410
    Posts
    2

    Question Can you Automatically Update Formulas and Data Validation Between 2 cells in Excel Using V

    In Excel, I have the following formula in cell D14:

    Please Login or Register  to view this content.
    This formula returns the name based on the contact entered in D13. I now want to extend this functionality, so that I can enter a name in D14, and the corresponding contact will appear in D13 using the lookup. Is it possible to achieve?



    I want to automate this process using VBA. Specifically, if I make a change in D13, the formula in D14 should turn into searching. Similarly, if I make a change in D14, the formula in D13 should adjust accordingly.

    Additionally, I have data validation applied to D13 with the formula '=Cust_List'. So, I also want the data validation in D14 to change to '=Cust_List_Name' when it will be used for search.
    Last edited by AliGW; 12-15-2024 at 10:07 AM. Reason: Code tags added.

  2. #2
    Valued Forum Contributor
    Join Date
    02-04-2017
    Location
    chennai
    MS-Off Ver
    MS OFFICE 365
    Posts
    440

    Re: Can you Automatically Update Formulas and Data Validation Between 2 cells in Excel Usi

    Here's the complete VBA solution:

    Setup a Worksheet Change Event
    This event will monitor changes in D13 and D14 and switch their formulas and data validation dynamically.

    Adjust Formulas Dynamically
    When D13 is changed, D14 will show the corresponding name. When D14 is changed, D13 will show the corresponding contact.

    Modify Data Validation Dynamically
    Update the data validation of D14 to reference Cust_List_Name when it is being used for searching.



    Please Login or Register  to view this content.
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Mark Thread as Solved...

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,303

    Re: Can you Automatically Update Formulas and Data Validation Between 2 cells in Excel Usi

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so. Cross-posts are allowed but you must provide a link to your posts on other sites.
    For new members: you will not be able to post a full URL, so remove the https://www. section and add one or two breaks to the rest of the address. A Moderator or Admin will then fix the link for you.

    Please see Forum Rule #7 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    (Note: this requirement is not optional. As you are new, I shall do it for you this time: https://www.mrexcel.com/board/thread...g-vba.1267827/)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    12-15-2024
    Location
    Muscat, Oman
    MS-Off Ver
    2410
    Posts
    2

    Re: Can you Automatically Update Formulas and Data Validation Between 2 cells in Excel Usi

    Thanks, and sorry for the late response. Your code looks great. However, I have used a simpler approach. It turns out that we don't need to explicitly set the validation after each update. The code I used:

    Please Login or Register  to view this content.

+ 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 list - automatically update cells where used
    By kmroy0320 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-18-2022, 07:15 AM
  2. Automatically Update Data Validation Entry
    By Catsonheat in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-19-2019, 04:04 PM
  3. [SOLVED] Data Validation List to automatically update
    By PDBartlett in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-23-2014, 10:26 AM
  4. [SOLVED] Making formulas that automatically update when adding cells
    By Biffinator in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-11-2014, 05:17 PM
  5. Data validation list - automatically update cells where used
    By raeganhill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2014, 05:25 AM
  6. multiple data validation list want to update automatically excel 2010
    By ninny76 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2013, 11:57 PM
  7. Glitch - Cells with formulas won't update automatically
    By Clue_Less in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-15-2012, 04:03 PM

Tags for this Thread

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