+ Reply to Thread
Results 1 to 4 of 4

Macro that changes data validation drop down box selection

  1. #1
    Registered User
    Join Date
    08-11-2020
    Location
    London, England
    MS-Off Ver
    Microsoft Office 365
    Posts
    6

    Macro that changes data validation drop down box selection

    Hi all

    first post here, am stuck on a small problem.

    I would like to make a simple macro that changes the selection of a drop down box (data validation). I have a list of 'quarter codes' (i.e. 2018-Q2, 2018-Q3) that i can select and this will change the data my spreadsheet outputs. But when I record the macro, it only records me selecting the cell (F1) where the dropdown box is located.

    The macro should be assigned to a button that when clicked, changes the selection in the drop down box to the relevant quarter.

    If anyone can help that would be very useful.

    Thanks

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: Macro that changes data validation drop down box selection

    Data validation is just layer to set cell value.
    So, you just need the macro to set cell value to whatever the value you need it to be. No need to control data validation dropdown via code.

    Ex:
    Please Login or Register  to view this content.
    Though it isn't clear to me how you want to change the value of the cell.
    Last edited by CK76; 08-11-2020 at 09:24 AM.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    08-11-2020
    Location
    London, England
    MS-Off Ver
    Microsoft Office 365
    Posts
    6

    Re: Macro that changes data validation drop down box selection

    Ah yes. That is a lot simpler. Sorry am relatively new to excel so am over-complicating. Thanks a lot.

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: Macro that changes data validation drop down box selection

    Glad to have helped

    If you are satisfied with the solution provided. Please mark the thread as solved using thread tools found at top of your initial post.

+ 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 drop down with calendar selection
    By dna247 in forum Excel General
    Replies: 5
    Last Post: 08-30-2017, 12:18 PM
  2. Replies: 1
    Last Post: 07-04-2017, 09:00 PM
  3. [SOLVED] Linking data validation drop down selection to open userform
    By Stew1234 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-16-2014, 10:40 AM
  4. Excel VBA multiple selection drop down data validation list
    By garoe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-25-2014, 05:20 PM
  5. Macro runs from Data Validation Drop Down List Selection
    By flindy87 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-28-2013, 11:45 AM
  6. Data validation drop down list with several selection
    By toblju in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 12:48 AM
  7. Data Validation: Need to restrict drop-down selection
    By splenguin in forum Excel General
    Replies: 5
    Last Post: 09-08-2009, 03:46 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