VBA Excel

Posted on 2009-12-18
Last Modified: 2013-11-25
I'm new to Excel VBA code. Most of my experience comes from Outlook but I'm guessing\hoping the principles and logic are the same and that Exp Exch can save me time hunting around books and the net.
I want to create a single selection drop down list (items, a, b, c, d, e) for an Excel 2003 spreadsheet based on a single cell (say A3). When a user selects an item from the A3 cell drop down list another cell (A4) will auto-fill with a value.

Any help much appreciated.
Question by:JP53
    LVL 5

    Expert Comment

    Something like that ???

    Author Comment

    Yes, but you've lost me. I was expecting a VBA module. How do I reproduce it?

    Author Comment


    Are you there?
    LVL 3

    Expert Comment


    Well the thing is you actually don't need vba to do that...

    First activate you form buttons in your toolbar,
    select the dropdown box (and draw one :p )
    Write down the values in your cells
    and afterwards select them in the properties of your dropdown box.

    HINT your range (values of list) doesn't need to be on your first sheet :)
    and you can use the INDEX() function to recall the name(value) of your selected item.

    Aside from that may I know why you actually need it to be in vba?
    As it is much more complex.

    Author Comment

    I'll go with your version. I've set up the drop down and put in the value range and link cell so whatever the user selects from the drop down appears in the cell. Can you give me a worked example of how you translate characters in your drop down into a numerical value.
    LVL 3

    Accepted Solution

    Well select the cell where you want the reference value to be
    and enter


    In this code A2:A7 is the range of selection of your combobox
    and C1 being the cell of  your numerical value.

    fyi: copy paste this in the example 'ghoshsaikat83' gave you... the cells match.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
    This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now