+ Reply to Thread
Results 1 to 2 of 2

Compare csv files

  1. #1
    Registered User
    Join Date
    11-21-2014
    Location
    Canada
    MS-Off Ver
    excel 2013
    Posts
    1

    Post Compare csv files

    Hi

    Basically what I'm looking for is something that compares line by line csv files which have the exact same names and have anywhere from 1 to 150 columns and 5000 rows.

    These files are currently located in two folders, one called PRE and the other POST.
    What I'm looking for is something that will save the results into a separate file called RESULTS

    Here is what I'm looking for the RESULTS file to display:

    (1) Any entries that DO NOT exactly match, and to SHOW the PRE entry and the POST entry displayed in RED

    (2) Any files that EXIST in the POST and DON'T exist in the PRE, displaying the entries too.

    Cheers
    Danny//

  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: Compare csv files

    COMPARE TXT FILES
    Here's a basic starting macro that allows you to select two folders, then it will compare the TXT files found in each folder of the exact same name and report line by line what is different between them. It will also indicate when a file is in one folder and not the other.

    This macro should work for any kind of text file.

    Compare TXT Files In Separate Folders
    Last edited by JBeaucaire; 12-26-2019 at 04:27 PM.
    _________________
    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!)

+ 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. Compare two .CSV files
    By venkysc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2014, 08:40 AM
  2. Comparing two mht files
    By narahari in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-03-2013, 02:55 PM
  3. Compare two files with the same ID
    By Shark Man in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-10-2009, 02:03 PM
  4. [SOLVED] I Have two files that i need to compare?
    By Daysi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-30-2005, 03:10 AM
  5. Compare Files with VBA
    By Celicaevo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-10-2005, 08:12 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