+ Reply to Thread
Results 1 to 6 of 6

Drop-Down Lists: Can we fill 2 columns at the same time?

  1. #1
    Registered User
    Join Date
    03-14-2009
    Location
    Indiana
    MS-Off Ver
    Excel 2003
    Posts
    41

    Drop-Down Lists: Can we fill 2 columns at the same time?

    Is there a way to have a drop-down list fill two columns (actually, two adjacent cells) when a selection is made from the drop-down list? Maybe using an array in the source formula?

    For instance, let's say I pick a doctor from the drop down list, I would like the doctor's practice to automatically fill the cell next it so that the two always go together correctly. In the lists example below, when I select Dr. Elmer in column A, then I want Internal Medecine Associates to go in column B.

    MD Practice
    Dr. Bartholomew Central Endocrine Specialists
    Dr. Elmer Internal Medicine Associates
    Dr. Stamford Cardiology Associates
    Last edited by HarvardMajesty; 05-15-2009 at 04:33 PM.

  2. #2
    Valued Forum Contributor Miraun's Avatar
    Join Date
    04-03-2009
    Location
    New England
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    554

    Re: Drop-Down Lists: Can we fill 2 columns at the same time?

    Hi HarvardMajesty;

    I have not used drop down lists in many of my projects. I played around with the function for a few minutes, and did not see selecting arrays when using the tooltip to work in the function you had described.

    However, an alternative would be to use a VLookup in the second cell based upon the dropdown from the initial cell.

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

    Re: Drop-Down Lists: Can we fill 2 columns at the same time?

    In that adjacent cell you would use a Vlookup() formula

    e.g.

    =if(A1="","",Vlookup(A1,X1:Y100,2,FALSE))

    where A1 contains the 1st drop down and X1:Y100 contains a table of Doctor names and corresponding practices.
    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.

  4. #4
    Registered User
    Join Date
    03-14-2009
    Location
    Indiana
    MS-Off Ver
    Excel 2003
    Posts
    41

    Wink Re: Drop-Down Lists: Can we fill 2 columns at the same time?

    This worked perfectly. Can you explain the logic behind the double quotes separated by the comma:

    =if(A1="","",Vlookup....

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

    Re: Drop-Down Lists: Can we fill 2 columns at the same time?

    The pair of double quotes is a null in Excel..

    So the statement says... if A1 is null (blank), then return a null, otherwise perform the Vlookup..

  6. #6
    Registered User
    Join Date
    03-14-2009
    Location
    Indiana
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Drop-Down Lists: Can we fill 2 columns at the same time?

    Thank you! Wow. 11,775 posts. That is amazing.

+ 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