+ Reply to Thread
Results 1 to 4 of 4

Populate fields automatically

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    49

    Populate fields automatically

    If I knew excel vocab better I would be able to describe this much easier. I will do my best.

    I have a list of transactions from particular vendors. We are integrating the transactions over into GP dynamics. The database that these transactions come from have the vendors name but they are very long. In GP dynamics the vendor ID is short.

    In order to get the integration to work properly I need the vendor ID as an additional field in the excel file. It would be a pain to have to look up the vendor IDs every single time we have to upload these transactions and add them to the excel file.

    I am wondering if there is a formula I can write that will automatically populate the vendor ID in one field based on the vendor name that is in another field. Example, if A1=Wal-Mart, B1=WALMA01. A column being the vendor field and B column being the vendor ID. I would hope to drag this formula down through the entire vendor ID column and have it automatically populate. I know the first time it will take a lot of manual entry but once it is done it will be done!

    Thank you! Please let me know where I need to clarify.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Populate fields automatically

    As long as you have a reference sheet somewhere that lists these combinations, it's an easy VLOOKUP formula.

    In a sheet called VENDORS, put your long vendor names in column A and the codes you want to retrieve in column B.

    Then back on your data sheet, this formula in A1: =VLOOKUP(A1, Vendors!A:B, 2, 0)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-10-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Populate fields automatically

    Great! That was very easy. Thank you.

    I understand every part of the formula except for the range_lookup. What does the 0 mean here?

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Populate fields automatically

    While typing in the formula bar, click on the Fx icon to the left of that formula bar and it will open up a "help" window that helps you understand the function you're using.

    Or press F1 at anytime and search on VLOOKUP to read Excel's very good tutorial on any function.
    Quote Originally Posted by Excel's Help File
    range_lookup Optional. A logical value that specifies whether you want VLOOKUP to find an exact match or an approximate match:
    If range_lookup is either TRUE or is omitted, an exact or approximate match is returned. If an exact match is not found, the next largest value that is less than lookup_value is returned.

    Important If range_lookup is either TRUE or is omitted, the values in the first column of table_array must be placed in ascending sort order; otherwise, VLOOKUP might not return the correct value.

    If range_lookup is FALSE, the values in the first column of table_array do not need to be sorted.

    If the range_lookup argument is FALSE, VLOOKUP will find only an exact match. If there are two or more values in the first column of table_array that match the lookup_value, the first value found is used. If an exact match is not found, the error value #N/A is returned.

    If that takes care of your question, please select Thread Tools from the menu above and mark the thread as solved. Thanks.

+ 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