+ Reply to Thread
Results 1 to 5 of 5

TWO Excel files, compare and return column values

  1. #1
    Registered User
    Join Date
    08-28-2015
    Location
    canada
    MS-Off Ver
    2010
    Posts
    2

    TWO Excel files, compare and return column values

    Hi everyone!

    Basically, I have two .csv files. Each file has TWO columns "SKU" AND "Quantity".

    When I open file #2, I need to Lookup matching SKU values in file #1, and return matching Quantity values. In other words, I need make sure that QUANTITIES are the same for both files with related SKU.

    The problem I am facing in creating the formulas is, both files are .csv and they are Two different files, not just tabs in one file.


    Helps and suggestions are greatly appreciated!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,693

    Re: TWO Excel files, compare and return column values

    In file #2, use this formula starting in C2 and fill down (I am assuming row 1 has headers and your data starts in row 2)

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Replace "File 1" with the actual file name (in both places).

    (Note: To save the formulas in File 2, you will have to save it as a .xlsx file.)
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: TWO Excel files, compare and return column values

    I created two files that matched your description with the SKU in column A of both files and the Quantity in column B. The file with the formula cannot be a CSV file and maintain the formulae because a CSV file is really a text file.

    In File 2.xlsx (Excel file to keep the formulae)
    Enter in B2 and fill down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Alternately, you can use this formula in B2 and fill down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Registered User
    Join Date
    08-28-2015
    Location
    canada
    MS-Off Ver
    2010
    Posts
    2

    Re: TWO Excel files, compare and return column values

    Thank you so much, this formulas is working perfectly =VLOOKUP(A2,'[File 1.csv]File 1'!$A:$B,2,FALSE)

    I need an advice, when I drag down the formula, missing fields show #N/A"... I would like them it remain BLANK.. what should I do ?

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,693

    Re: TWO Excel files, compare and return column values

    What do you mean by "missing fields"? Data in File 2, where the formula is, is blank? Or the information you are trying to find in File 1 is not there?

    To deal with both types of errors use this formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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. Replies: 0
    Last Post: 03-31-2015, 02:41 PM
  2. Replies: 8
    Last Post: 09-25-2014, 10:14 AM
  3. Replies: 8
    Last Post: 05-16-2013, 05:28 PM
  4. Replies: 0
    Last Post: 12-07-2011, 05:25 PM
  5. Replies: 1
    Last Post: 10-28-2011, 03:13 AM
  6. compare two files and return missing cell contents
    By anstasija in forum Excel General
    Replies: 2
    Last Post: 08-16-2011, 09:45 AM
  7. Compare values in 2 columns, return Y/N in a third column
    By creed1101 in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 07-08-2009, 01:29 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