+ Reply to Thread
Results 1 to 5 of 5

Automatically fill in fields upon entering a customer ID

  1. #1
    Registered User
    Join Date
    01-30-2013
    Location
    Norfolk, England
    MS-Off Ver
    Excel 2013
    Posts
    3

    Automatically fill in fields upon entering a customer ID

    Hi all,

    First off, sorry if this is in the wrong place but I wasn't sure whether to class this as a Macro problem or a formula function and I'm sorry if this has been posted before but the search bar is such a struggle

    So, my problem:

    I was wondering how you would automatically fill in detail fields after verifying a customer number. For instance, I enter the customer ID and their name, address etc is entered automatically. I've tried creating a mock-up database using Access and linking it to Excel but it doesn't seem to want to play and I'm not sure of the formula/code to use either.

    I've tried using =VLookup but that makes me stumble everytime so if someone could explain that, it would be much appreciated :P

    I was also thinking about using a button and code in the function with VBA. Anyone give me a hand with that?

  2. #2
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Automatically fill in fields upon entering a customer ID

    Welcome cbarckley9,

    I've attached a sample VLOOKUP... you simply enter in A2 a Cust ID and it returns their info...

    Let me know what you think...
    Attached Files Attached Files

  3. #3
    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
    52,959

    Re: Automatically fill in fields upon entering a customer ID

    Hi cbarckley9 and welcome to the forum

    Either vlookup() or index/match will give you what you need. vlookup is (possibly) the easier of the 2, but has the restriction that it cannot look to the left of the column that has the criteria you are looking for (ie, it cant look "behind" itself)

    vlookup syntax is...
    =VLOOKUP(what-you-want-to-find,range-to-search-in,column-that-contains-the-match,FALSE) FALSE is for finding an exact match

    index/match/match syntax is....
    =index(range,row,column)
    you can replace row and/or column with match...
    =match(criteria-to-search-for,column-containing-the-criteria,0)...this is for the row part 0 is for an exact match
    =match(criteria-to-search-for,row-containing-the-criteria,0)...this is for the column part

    let me know how you make out please?
    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

  4. #4
    Registered User
    Join Date
    01-30-2013
    Location
    Norfolk, England
    MS-Off Ver
    Excel 2013
    Posts
    3
    Thanks for the reply guys, I'll try both suggestions and let you know the results

  5. #5
    Registered User
    Join Date
    01-30-2013
    Location
    Norfolk, England
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Automatically fill in fields upon entering a customer ID

    Quote Originally Posted by djapigo View Post
    Welcome cbarckley9,

    I've attached a sample VLOOKUP... you simply enter in A2 a Cust ID and it returns their info...

    Let me know what you think...

    I've tried this out and followed the little dandy notes you left (Thanks for those :D) and managed to re-create a similar thing. Problem solved!

    Thanks a lot for the help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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