+ Reply to Thread
Results 1 to 6 of 6

is it impossible to match 2 columns & return values from a 3rd when a match is found

  1. #1
    Registered User
    Join Date
    10-04-2008
    Location
    Germany
    Posts
    16

    is it impossible to match 2 columns & return values from a 3rd when a match is found

    hello,

    i have two files, each files has a list of countries as one column and second column a number of employees. I want to find the country from the 1st file, in the list of the countries of the second file, and when a match is found, a formula should take the respective number of employees from this second file, and transfer/copy them to the relevant/respective country in the 1st file. That is, the column with number of employees in the first file is empty, and it has to be filled in with the same number of empl. from the 2nd file, once the matching country (i.e. a country with the same name) is found between the two files,

    any idea how to proceed?

    thx
    Last edited by excel_try; 10-04-2008 at 06:13 PM.

  2. #2
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    You can do this with the VLOOKUP function. You'll need both files open to set the formula up. The formula would be something like:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-04-2008
    Location
    Germany
    Posts
    16
    ..........
    Last edited by excel_try; 10-05-2008 at 04:48 AM.

  4. #4
    Registered User
    Join Date
    10-04-2008
    Location
    Germany
    Posts
    16
    Quote Originally Posted by mdbct View Post
    You can do this with the VLOOKUP function. You'll need both files open to set the formula up. The formula would be something like:
    Please Login or Register  to view this content.
    hallo,

    thx for the reply, but vlookup is not working:

    1. i am comparing text
    2. i have >100 countries, and with vlookup i have to type every single one, and this is what i want to escape (mb i need to refer to an array, or string, or no idea)
    3. mb a solution could be sth with index, or match, i just tried it, copying some similar formula from www, but it didn't match the countries, and return the value respective for that country.

    E.g. I have China in col1 (1st file), #employees 10 in col2 (1st file), and China in Col 1 in 2nd file. So, a formula should match China & China from both files, and return 10 as number of employees.

    If you see a solution, pls. let me know,

    thx a lot...

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    The VLOOKUP formula will work if the text for CHINA is the same in both workbooks.

    Does the formula return #N/A, if so this would suggest that the countries names are not identical.

    Post example of your data. For helping with your problem put the different workbook data on different worksheets in the 1 workbook.
    Cheers
    Andy
    www.andypope.info

  6. #6
    Registered User
    Join Date
    10-04-2008
    Location
    Germany
    Posts
    16
    Quote Originally Posted by Andy Pope View Post
    The VLOOKUP formula will work if the text for CHINA is the same in both workbooks.

    Does the formula return #N/A, if so this would suggest that the countries names are not identical.

    Post example of your data. For helping with your problem put the different workbook data on different worksheets in the 1 workbook.
    thx, i got it solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VLOOKUP - Can you match columns other than column 1?
    By longfisher in forum Excel General
    Replies: 4
    Last Post: 03-04-2008, 10:07 PM
  2. Function to match random list values to set list values.
    By Sandman4432 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-24-2007, 09:22 PM
  3. Columns of data ... need a macro that can find differences of 0.06 & Fill Color them
    By rocket1406 in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 08-27-2007, 03:16 AM
  4. Matching Values from different columns
    By T De Villiers in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-13-2006, 02:28 PM
  5. Excel Align equal values in adjoining Columns
    By egan-23 in forum Excel General
    Replies: 2
    Last Post: 09-13-2006, 12:28 PM

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