+ Reply to Thread
Results 1 to 4 of 4

Excel macro to fill cell with one click based on value from dropdown list

  1. #1
    Registered User
    Join Date
    10-27-2018
    Location
    Romania
    MS-Off Ver
    excel 2010
    Posts
    19

    Excel macro to fill cell with one click based on value from dropdown list

    I want to fill a range of cells let's say A1:A5 with the value that is in a drop down list let's say in B1, by clicking once with the mouse in cells A1:A5. The way i want it to work is to first select the value that i want from the dropdown list and then click in in any of the cells from range A1:A5, and only the cell selected changes to the value from the dropdown list. And also when i change the value from the dropdown list the cells that were previously filled by clicking them do not change automatically to the new value from drop down. Once clicked they remain to that value until clicked to another selected value.(Ex:i select from dropdown B1 cell value 1, and then i click cell A1, and this cell is filled with 1, then i select from dropdown value 2, and the i click cell A2 which is filled with 2.The cell A1 previously filled remains the same (1), and the other cells from the range that were not clicked do not show anything).

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Excel macro to fill cell with one click based on value from dropdown list

    Hi gorely84,

    You would place this in the code for the worksheet... not a normal module:

    In the vba editor, double-click the sheet name (top left of the window), and paste this code there:

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    10-27-2018
    Location
    Romania
    MS-Off Ver
    excel 2010
    Posts
    19

    Re: Excel macro to fill cell with one click based on value from dropdown list

    Thank you, it works perfectly!

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Excel macro to fill cell with one click based on value from dropdown list

    Thanks for the feedback gorely84
    If you would be so kind, please mark the thread as solved if the issue is resolved? Thanks!

+ 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. VBA Button to fill in data based off dropdown list value
    By Colosimo87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2018, 01:53 AM
  2. Automatically fill in a dropdown selection based on a previous dropdown
    By thanhthinh1234 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-24-2018, 08:10 PM
  3. [SOLVED] Excel Dropdown Blank [User Can't Click Cells with Dropdown]
    By jamie.harris in forum Excel General
    Replies: 19
    Last Post: 06-21-2018, 04:27 PM
  4. Replies: 6
    Last Post: 02-02-2016, 04:26 PM
  5. Replies: 3
    Last Post: 11-13-2015, 05:10 AM
  6. macro to unhide one cell based on the dropdown list value from the cell above
    By famu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2013, 02:00 PM
  7. Excel 2007. Macro to move data based on dropdown list.
    By D_N_L in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-10-2012, 10:52 AM

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