+ Reply to Thread
Results 1 to 9 of 9

Excel 2007 : auto fill help

  1. #1
    Registered User
    Join Date
    05-12-2012
    Location
    sterling heights, mi
    MS-Off Ver
    Excel 2007
    Posts
    11

    auto fill help

    I have a list of employees with ids and department infomation on a spreadsheet and would like to have the information auto fill on another sheet when the id is filled in. Is this possible?

    I have the employees listed on sheet named "database" as follows:
    name id center department (columns a,b,c,d)

    Then on the next sheet named "may"(I have one for each month) I would like the information to populate if an id is entered that is on the list in the sheet database. (same order different columns (e,f,g,h))

    Can anyone help??

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,243

    Re: auto fill help

    Use VLOOKUP.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor SCLai's Avatar
    Join Date
    08-18-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    129

    Re: auto fill help

    To elaborate on TMS's point:
    In your 2nd sheet (May) Cell E2 <NAME column>, enter the following
    =INDEX(database!A:A,MATCH(F2,database!B:B,0))

    For G2 <CENTRE column> & H2 <DEPARTMENT column>,
    G2: =VLOOKUP(F2,database!B:C,2)
    H2: =VLOOKUP(F2,database!B:D,3)

    Hope it helps!

    SC
    Do give a * (bottom left) if the post helped!

  4. #4
    Registered User
    Join Date
    05-12-2012
    Location
    sterling heights, mi
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: auto fill help

    That worked great, but its only pulling the information from row 2 on the database spread sheet instead of the row of info that the ID is on...

  5. #5
    Registered User
    Join Date
    05-12-2012
    Location
    sterling heights, mi
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: auto fill help

    I just dont get it....

    Thanks for the script SClai, that worked, mostly... the name column is always right, but the Center and department column are almost random. Either the code will get all three feilds right or just the name and center, sometimes just the name.

    Ive taken to continuing on and just manually checking the information on the database page, but this is tedious and would love to have the confidence that the information is generated correctly without having to double check it.

    I appreciate any assistance/tips... Thanks in advance!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: auto fill help

    can you upload a sample?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,243

    Re: auto fill help

    I think maybe the formulae should be:

    G2: =VLOOKUP(F2,database!B:C,2,FALSE)
    H2: =VLOOKUP(F2,database!B:D,3,FALSE)


    Regards, TMS

  8. #8
    Registered User
    Join Date
    05-12-2012
    Location
    sterling heights, mi
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: auto fill help

    Oh YAY! that false addition worked perfect! all set guys Thanks alot!!!

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,243

    Re: auto fill help

    You're welcome. Thanks for the rep.

+ 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