+ Reply to Thread
Results 1 to 6 of 6

Auto-Filling Fields

  1. #1
    Registered User
    Join Date
    04-12-2010
    Location
    MD
    MS-Off Ver
    Excel 2003
    Posts
    9

    Auto-Filling Fields

    I am trying to create sort of a form in Excel 2003 and what I want to do is have a box where you can select (like a drop down menu) or type in a job name and then have it fill out a bunch of other cells automatically.

    The data would be on a separate sheet in the same document and have fields like job name, job number, address, contact information, and so on. I want to be able to type or select a job name and then have it pull the information from the second sheet and insert the corresponding information into separate cells.

    Is this possible?

    I'm not very good with the whole formula/macro thing in Excel so any help would be grateful.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Auto-Filling Fields

    You've posted your question in the VBA section of the Forum, however, you don't need VBA code to accomplish what you have described. That can be done, with a properly structured worksheet and look up table, using a look up function like VLOOKUP.

    See the attached basic example. The drop down in cell A2 is a Data Validation list using a named range as the list source.

    Sheet2 holds the lists.
    Attached Files Attached Files
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Registered User
    Join Date
    04-12-2010
    Location
    MD
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Auto-Filling Fields

    Sorry, I didn't realize.

    Thanks for the help.

  4. #4
    Registered User
    Join Date
    04-12-2010
    Location
    MD
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Auto-Filling Fields

    I figured out how to do the drop down list but I can't get the VLOOKUP command to work. I'm attaching a sample file of what I am looking for.

    The problem I'm having is that the list on my form isnt set up the same as the second sheet. the fields are in different areas and they aren't on the same line.

    Please look over the file and see if you can help me.

    Thanks,

    Jester
    Attached Files Attached Files

  5. #5
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Auto-Filling Fields

    The problem I'm having is that the list on my form isnt set up the same as the second sheet. the fields are in different areas and they aren't on the same line.
    What's important is the structure of the look up table, which can be made to work with virtually any layout of the form (limitations apply depending on the look up method used).

    If you will always be looking up values based on the Job Name and job name in the look up table is always the first column (left-to-right), then the VLOOKUP formula will suffice, otherwise you would need a combination of INDEX/MATCH functions.

    In this look up formula the range references are hard-coded. If you expect the look up table to increase or shrink over time, then I suggest you create a dynamic named range for the table and use the named range in place of the hard-coded reference.

    Formula in cell M5 (Job #): =VLOOKUP(N4,Sheet2!B2:E4,2,0)

    See attached.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-12-2010
    Location
    MD
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Auto-Filling Fields

    Thanks... that did the trick.

    - Jester

+ 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