How To Compare Data In Excel

Table of contents:

How To Compare Data In Excel
How To Compare Data In Excel

Video: How To Compare Data In Excel

Video: How To Compare Data In Excel
Video: How to Compare Two Excel Sheets (and find the differences) 2024, April
Anonim

Almost always, the analysis of data placed in tables involves comparing them with each other or with reference values. If you use the Microsoft Office Excel spreadsheet editor to work with the collected information, you can use its built-in functions in comparison operations. The simplest functions of this kind are "EXACT" and "IF".

How to compare data in Excel
How to compare data in Excel

It is necessary

Tabular editor Microsoft Office Excel 2007 or 2010

Instructions

Step 1

Use the EXECUTE function to find out if the values in two table cells are the same. For example, if the compared values are placed in cells with addresses B3 and C3, and the result of their comparison should be displayed in cell D3, click it with the mouse and go to the "Formulas" tab in the Excel menu. In the group of commands "Library of functions" open the drop-down list "Text" and select the line "EXACT" in it. As a result, a form with two fields "Text1" and "Text2" will appear on the screen, in each of them put the address of one of the compared cells (B3 and C3). Then click on the OK button and you will see the comparison result - either the inscription "FALSE" or "TRUE".

Step 2

If the text "FALSE" or "TRUE" as a result of the comparison does not suit you, use the function "IF" - it allows you to set the values that should be displayed as a result of the operation. Having placed the cursor in the cell selected for output, open the "Logical" drop-down list in the same group of commands "Library of functions" and select the very first line - "IF". The appeared form for filling out the arguments will contain three fields. In the first one - "Log_Expression" - formulate the comparison operation itself. For example, to find out if the values in cells B3 and C3 are the same, write B3 = C3. In the "Value_if_true" and "Value_if_false" fields, place the labels or numbers that should be displayed if the comparison is positive or negative. Click OK to finish entering the function arguments.

Step 3

If a comparison operation needs to be performed line by line for two columns of a table, place one of the functions described above in the first row of the third column, and then extend it to the height of the compared columns. This can be done, for example, by stretching down the lower right corner of the cell with the formula - when you move the mouse pointer over it, the cursor becomes a black plus. Then select the third column and, on the Home tab, expand the Conditional Formatting list in the Styles group of commands. In the "Cell Selection Rules" section, select the "Equals" line, and then click the first cell of the selected column and press Enter. In this way, you will highlight cells with matching data comparison results - this will more visually represent the results of the operation.

Recommended: