+ Reply to Thread
Results 1 to 6 of 6

Auto Fill a cell based on drop down selection in a another cell

  1. #1
    Registered User
    Join Date
    02-25-2009
    Location
    LaFollette, TN
    MS-Off Ver
    Excel 2003
    Posts
    2

    Auto Fill a cell based on drop down selection in a another cell

    Can you please help a Newbie?

    I have a document that has a dropdown list of names. The cell next to it needs a doller amount that corrosponds to the individual names. Can this second cell be filled automatically? It would look something like this:

    Joe 150.23
    Bob 75.89

    I'm sure this is unbelievably simple, and I appologize if it has been answered before. This is my first post here so if I have not provided enough information please let me know.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Auto Fill a cell based on drop down selection in a another cell

    I assume you have a list of names and corresponding $ amounts somewhere in the sheet....if not, create one or tell us how you get the values.

    If so, then use Vlookup()

    e.g.

    =Vlookup(A1,$X$1:$Y$100,2,False)

    where A1 contains your drop down list and X1:Y100 contains the lookup table.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    02-25-2009
    Location
    LaFollette, TN
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Auto Fill a cell based on drop down selection in a another cell

    This is outstanding! I have it working except for one thing I neglected to mention. The data are arranged in colomns. Names in one, $ in the the other. The second column sums at the bottom, and there will be several cells along the column that will be blank. As is, when the cells are blank, they're returning a #N/A error and preventing the sum. Is there a way to prevent this?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Auto Fill a cell based on drop down selection in a another cell

    Try replacing formula with this one

    Please Login or Register  to view this content.


    adjusting ranges/references to suit.

  5. #5
    Registered User
    Join Date
    03-07-2013
    Location
    Nottingham
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Auto Fill a cell based on drop down selection in a another cell

    Hello,

    I have a similar problem but the final code doesn't seem to solve.

    I have a drop down list (list of flyers: i.e. A4 handout) B3 and I want this to populate cell C3 with the number of stock (i.e 100). I've created a table of data to read from and your initial method worked but I had the same "#N/A" problem. I too want empty cells to remain blank or have 0.

    I've tried copying in the above formula and Excel says it's wrong.

    Please help as this has been the most helpful post so far.

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Auto Fill a cell based on drop down selection in a another cell

    KWayland,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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