Need to compare two files Microsoft Excel? Here are two simple ways do it.

There are many reasons why you might need to take one Excel document and compare it with another. This can be a time consuming task.

it requires a lot of concentration, but there are ways to make your life easier.

Do you need to take a closer look manually or do you want Excel to do some of the heavy lifting

on your behalf, here are two easy ways to compare multiple sheets.

How to Compare Excel Files

Excel allows users to display two versions of a document at once to quickly identify the differences between them:

  1. First, open the workbooks you want to compare.
  2. Go to View > Window > Side View.

Comparing Excel files by eye

To begin, open Excel and any workbooks you want to compare. We can use the same technique to compare sheets in the same document

or completely different files.

If more than one sheet is obtained from the same book, it must be separated in advance. To do this, go to View > Window > New Window.

It won't divide separate sheets forever, it will simply open a new copy of your document.

This menu will list all tables that are currently open. If you only have two open, they will be selected automatically.

Make your selection and click Fine. You will see both tables appear on the screen.

If it's more convenient, you can use Arrange everything button to switch between vertical and horizontal configuration.

One important option to be aware of is Synchronized scrolling switching

Enabling this option ensures that when you scroll one window, the other will move in sync. This is important if you are working with a large table

and you want to keep testing one against the other. If for any reason the two sheets are not aligned, simply click Reset window position.

Comparing Excel Files Using Conditional Formatting

In many cases best way comparing two spreadsheets may be as simple as displaying them on the screen at the same time. However, it is possible to somewhat automate the process.

Using Conditional Formatting

We can check Excel for any discrepancies between the two sheets. This can save a lot of time if all you need to find are the differences between one version and another.

For this method, we need to make sure that the two sheets we are working with are part of the same workbook. To do this, right-click the name of the sheet you want to transfer and select Move or copy.

Here you can use the drop-down menu to decide which document it will be pasted into.

Select all the cells that are filled in the worksheet where you want any differences to be highlighted. Fast way to do this is to click the cell in the top left corner and then use the shortcut

Ctrl + Shift + End.

Go to Home> Styles> Conditional Formatting> New Rule.

Choose Use a formula to determine which cells to format and enter the following:

A1sheet_name!A1

Just remember to post "sheet_name" for any other sheet name. This formula only checks when a cell on one sheet does not exactly match the corresponding cell on another sheet, and flags each instance.

Above you can see the results. All cells containing changes have been highlighted in red, allowing you to quickly and easily compare the two sheets.

Let Excel do the hard work

The above technique demonstrates one way you can let Excel handle some of the heavy lifting. Even if you pay close attention, there is a chance that you might miss a change if you perform this task manually. With conditional formatting, you can be sure nothing slips through the web

Excel is good at monotonous and detail-oriented work. Once you've mastered its capabilities, you can save yourself some time and effort by using techniques like conditional formatting and a little creativity.

Do you have any advice for comparing documents in Excel? Or do you need help with the processes described in this guide? Either way, why not join the conversation in the comments section below?

It happens that you have two almost identical texts, and you need to clearly see how exactly they differ. A common example: you “recorded” an interview and sent it to a demanding interlocutor for proofreading. And he, instead of highlighting his edits in color, simply cut out some phrases, added new ones, and swapped paragraphs.

As a result, you seem to be reading your own interview, but you don’t recognize him “in makeup.” Comparing two large texts manually is difficult - is it possible to make this task easier? website will tell you how.

Programmers often face such tasks, so file comparison programs can highlight syntax when comparing program codes of different programming languages. We need such programs to allow comparing texts in the usual .txt format and, preferably, in Word.

For comparison, we took several paragraphs of our article and replaced some words and swapped phrases. Now we will compare.

Microsoft Word

In the program Microsoft Office Starting from version 2007, you can compare two files without leaving Word. Go to the menu item Review – Compare – Compare... (comparing two versions of a document). We specify two files, click the “More” button and mark the parameters by which you want to compare the text, and also select where to view the changes: in the first file, in the second or in a new one.

The program highlights deleted text with red strikethrough text, inserted text with red underline, and moved paragraphs with green text. In a separate panel on the left (not in the screenshot below) you can track changes for each word, and also see a summary: in our case, 57 corrections, of which 26 insertions, 29 deletions, 2 moves.

WinMerge is a free cross-platform file comparison utility that can be used on a rich "zoo" operating systems, starting with Windows 98. Latest version– WinMerge 2.14.0 – exists both as an installer (6.14 MB) and as a portable assembly. The out-of-the-box program can only compare regular text files, and if we want to work also with office documents(texts in .doc, .docx, .odt formats, tables in .xls, .xlsx, .sxc formats, PDF files and other office files of exotic formats), you need to download the Xdocdiff plugin. The plugin is connected as follows:

1) Unpack the archive with the plugin

2) Copy the xdoc2txt.exe and zlib.dll files to the folder with installed program WinMerge

3) Copy the entire MergePlugins folder along with the amb_xdocdiffPlugin.dll file to the folder with the installed WinMerge program

4) Launch WinMerge, go to the Add-ons menu – List, check the “Enable add-ons” checkbox

5) Go to the Add-ons menu – check the box “Unpack automatically”

That’s it, now you can open our two files: if you want, the usual “TEXT” files, or if you want, the “Word” ones.

The program will warn you that you can also specify archived files, but to do this you will have to download an archiver plugin. However, we are not afraid of its absence; we refuse future similar notifications and receive a window with our two texts. On the left side of the window there are two long columns: these are miniatures of our texts. Paragraphs in which changes were found are highlighted in yellow. Since there were such changes in each of the three paragraphs of our source text, both columns are colored yellow. Specific changed words are highlighted in light yellow.

But the program has many settings, so it’s easy to highlight the words in some other color.

There are many programs for comparing files, including text files, but their main drawback is the price. Compare it! costs $29 per license, Beyond Compare – $30, Compare Suite – $70, DiffDoc Professional – as much as $399.95. Let's use this latest, most expensive program as an example to see how much better it is than the free WinMerge.

Download the program (7 MB) and run it. The result is very similar to what Microsoft Office 2007 gave us, only the column layout is different. Red strikethrough – text that has been changed, red underline – text to which the original one has been changed (red strikethrough); blue strikethrough – cut text, green – moved (or added “from scratch”) text.

It turns out that there is practically no difference. If the user honestly bought an expensive Microsoft office suite, then there is no point in spending another $400 on the official purchase and registration of this program. There is no need to use even the “trial” version if the same functionality is provided by standard Word, especially since the unregistered version of DiffDoc Professional reminds you of the need to purchase every 15 minutes.

Finally, let's check one of the many online services for comparing texts: DiffNow

The service seems to support downloading doc files, “swallowed” them, wrote Files compared successfully (“file comparison was successful”), but instead of the normal result it gave a binary set of zeros and ones, in which, however, it highlighted the differences. Therefore, it is better to copy and paste the text manually. The site highlights changes like this: brown – changed text, blue – deleted, burgundy – added, purple – changed words in changed sentences. The service supports various settings (including the ability to change colors), but we couldn’t get rid of one drawback with any settings: the text is elongated in length like a programmer, so you have to use horizontal scrolling.

Everyone knows that Word is a multifunctional text editor. Its many possibilities go far beyond the scope of this article. This article will tell you how to compare the two Word file in the program itself. This procedure is quite simple, but few people even know about it. It can be useful in different cases, for example, when there are two files on the computer: your work and its draft. In order not to make a mistake and not send a draft to the customer, it is best to use a comparison of two files.

Step 1: preparatory stage

It is noteworthy that after you compare two files, they will remain unchanged, and any discrepancies will be shown in another (new) document that will open automatically. But first things first. First, let's figure out what you need to do first before comparing two Word files.

The first thing you need to do is prepare. Before you can compare two Word files, you need to open them. So find them on your computer and double-click on them.

Now we need to open the tool we need in one of the files. It is located in the "Review" tab in the "Comparison" tool group. The tool is called “Compare”, so click on it and select the item of the same name from the drop-down menu.

So, you are there, now you can proceed directly to how to compare two Word files for differences or matches.

Step 2: selecting documents to compare

A window called “Compare versions” is now open in front of you. As you can see, there are two areas in it: "Original Document" and "Changed Document". Accordingly, you should place the original document in the first, and its corrected version in the second.

To select a document, you need to click on the folder icon next to After clicking, an explorer will open in which you need to navigate to the file you are looking for. Once this is done, repeat the steps for the second file.

Now we have selected the necessary documents for comparison, but do not rush to click the “OK” button to begin the analysis process. In order to get the desired result, it would be better to set the necessary parameters. Let's talk about how to do this now.

Step 3: set the necessary parameters for comparison

So, before comparing two Word files, it would be wiser to set the parameters on which the analysis will be based. This will reveal the inconsistencies you want to find.

To open the options menu, you need to click on the "More" button, all in the same "Compare versions" window.

In the menu that expands, you can see a bunch of settings. Now let's turn our attention to the "Comparison Options" group. In it you need to select those elements that will be compared in two documents. By the way, the fewer checkboxes are checked, the faster the comparison process will go. Therefore, if you are looking for formatting changes, it would be wise to highlight only this item while leaving out the others.

In the "Show changes" group, choose what exactly to look for them in: characters or words. Also, do not forget to indicate in which document to show the result. In the source, modified file or new.

After you have set all the parameters you need, you can safely click the “OK” button to begin the analysis process. It does not last very long, even if all comparison points have been selected.

Step 4: Check the result

In the end they will show you the result. Depending on your choice, it will be demonstrated in one of two documents or in a new, third one.

Locations that do not match will be marked with a red line. Which is very convenient - by clicking on the line, you will be shown the difference. It will be crossed out with a red line.

By the way, if you didn’t know how to compare two Word files for matches, then, unfortunately, you won’t be able to do this in the program. However, special services can be used for this purpose.

Compare is one of the most useful plugins. And if you need to compare 2 files in Notepad++, compare is what you need.

In order to compare files in notepad++, let’s check if the plugin is installed. To do this, open the plugins tab. If it is not installed, go to the Plugin Manager: Plugins - Plugin Manager - Compare - Install. After installing the plugin, the editor will reboot.

In notepad++, comparing files is quite simple: open the two files that need to be compared, press Ctrl+Alt+1 or perform an action in the menu.

After this, we have three sections of the window: the first file, the second and the Compare NavBar in which differences in documents, if any, are graphically noted. So we compared two files Notepad++ editor.

In notepad++, comparing two files turned out to be quite simple, as you can see, the notepad++ editor carries out a line-by-line comparison of files with highlighting of lines with different code. For me, as for many webmasters, this editor is the best.

Sometimes there is a need to compare several files with each other. This may be useful when analyzing the differences between several versions of a configuration file or simply to compare different files. In Linux there are several utilities for this, both for working through the terminal and in graphical interface.

In this article we will look at how Linux file comparison is performed. Let's look at the most useful methods, both for the terminal and in graphical mode. First, let's look at how to compare a Linux file using the diff utility.

The diff linux utility is a program that runs in console mode. Its syntax is very simple. Call the utility, pass necessary files, and also set options if necessary:

$ diff options file1 file2

You can transfer more than two files if necessary. Before moving on to the examples, let's look at the utility options:

  • -q- display only file differences;
  • -s- display only matching parts;
  • -With- display the required number of lines after matches;
  • -u- output only the required number of lines after differences;
  • -y- display in two columns;
  • -e- output in ed script format;
  • -n- output in RCS format;
  • -a- compare files as text, even if they are not text;
  • -t- replace tabs with spaces in the output;
  • -l- divide into pages and add support for paging;
  • -r- recursive comparison of folders;
  • -i- ignore case;
  • -E- ignore changes in tabs;
  • -Z- ignore spaces at the end of the line;
  • -b- ignore spaces;
  • -B- ignore empty lines.

These were the main options of the utility, now let's look at how to compare Linux files. In the output of the utility, in addition to directly displaying the changes, it displays a line in which it is indicated in what line and what was done. The following symbols are used for this:

  • a- added;
  • d- deleted;
  • c- changed.

In addition, lines that differ will be indicated by the symbol<, а те, которые совпадают - символом >.

Here are the contents of our test files:

Now let's compare the diff files:

diff file1 file2

As a result, we get the line: 2,3c2,4. It means that lines 2 and 3 have been changed. You can use options to ignore case:

diff -i file1 file2

The output can be drawn in two columns:

diff -y file1 file2

And using the -u option, you can create a patch, which can then be applied to the same file by another user:

diff -u file1 file2

To process multiple files in a folder, it is convenient to use the -r option:

diff -r ~/tmp1 ~/tmp2

For convenience, you can redirect the utility output directly to a file:

diff -u file1 file2 > file.patch

As you can see, everything is very simple. But not very convenient. It's more enjoyable to use graphical tools.

Comparing Linux Files Using GUI

There are several excellent tools for comparing files on Linux in a GUI. You can easily figure out how to use them. Let's look at a few of them:

1.Compare

Kompare is a graphical diff utility that allows you to find differences in files and also merge them. Written in Qt and designed primarily for KDE. Here are its main features:

  • Supports multiple diff formats;
  • Support comparison of linux file and directories;
  • Support for viewing diff files;
  • Customizable interface;
  • Creating and applying patches to files.

2. DiffMerge

DiffMerge is a cross-platform program for comparing and merging files. Allows you to compare two or three files. On-the-fly line editing is supported.

Peculiarities:

  • Directory comparison support;
  • Integration with file viewer;
  • Customizable.

3. Meld

It is a lightweight tool for comparing and merging files. It allows you to compare files, directories, and also perform version control functions. The program was created for developers and has the following features:

  • Comparison of two and three files;
  • Using custom types and words;
  • Automatic merging mode and actions with text sides;
  • Support for Git, Mercurial, Subversion, Bazar and much more.

4. Diffuse

Diffuse is another popular and fairly simple tool for comparing and merging files. It is written in Python. Two main features are supported - file comparison and version control. You can edit files while viewing. Main functions:

  • Syntax highlighting;
  • Keyboard shortcuts for easy navigation;
  • Supports unlimited cancellations;
  • Unicode support;
  • Support for Git, CVS, Darcs, Mercurial, RCS, Subversion, SVK and Monotone.

5.XXdiff

XXdiff is free and very powerful tool to compare and merge files. But the program has several disadvantages. This is the lack of support for Unicode and file editing.

Peculiarities:

  • Shallow or recursive comparison of one or two files and directories;
  • Highlighting differences;
  • Interactive association;
  • Support for external diff tools such as GNU Diff, SIG Diff, Cleareddiff and more;
  • Extensibility via scripting;
  • Customizability.

6. KDiff3

KDiff3 is another excellent, free tool for comparing files in the KDE desktop environment. It is part of the KDevelop suite of programs and runs on all platforms, including Windows and MacOS. You can compare two linux files for two or three, or even compare directories. Here are the main features:

  • Display differences line by line and character by character;
  • Automerge support;
  • Handling merge conflicts;
  • Unicode support;
  • Show differences;
  • Supports manual leveling.

Conclusions

In this article, we looked at how to compare Linux files using the terminal, how to create patches, and also made a short review of the best graphical utilities for comparing files. What comparison tools do you use? Write in the comments!


Close