04 Alternative Methods How To Compare Two Columns In Excel

04 Alternative Methods: How To Compare Two Columns In Excel?


In this tutorial, we will explain How To Compare Two Columns In Excel (for differences and matches) and it is most important to identify the differences. Regularly, every Excel user tries to retrieve data from other files into the master file (usually with the help of the VLOOKUP function, INDEX MATCH function) and checks the latest update if any by any of the following 4 methods. However, users can update their master file with the changes (if any), so it helps to save a lot of time and reduces the gap of abnormality in the master file.   

(01) HOW TO COMPARE TWO COLUMNS IN EXCEL USING SIMPLE LOGICAL FORMULA (CASE INSENSITIVE)

We can create a simple logical formula to determine whether two cells contain the same entry. For example, use this formula to determine whether cell A2 has the same contents as cell C2:

=A2=C2

This formula will return either TRUE or FALSE, depending on the contents of cells A2 and C2.

However, Excel is a bit lax in its comparisons when text is involved. Consider the case in which A2 contains the word AUS-36 (all uppercase), and C2 contains aus-36 (all lowercase). We’ll find that the previous formula returns TRUE even though the contents of the two cells are not really the same. In other words, the comparison is not case-sensitive.

Step 1: At first, select cell D2, then place an equality sign (=) to start the formula. Then select the first cell A2, again place an equality sign (=) after A2, and select cell C2.

COMPARE TWO COLUMNS IN EXCEL ➢ USING SIMPLE LOGICAL FORMULA (CASE INSENSITIVE)_1

Step 2: Then simply press Enter or Ctrl+Enter, which will show either TRUE or FALSE. In this case, it will show TRUE which means the value in cell A2 is equal to the value in cell C2,  otherwise, it will show as FALSE.

COMPARE TWO COLUMNS IN EXCEL ➢ USING SIMPLE LOGICAL FORMULA (CASE INSENSITIVE)_2

Step 3: Extend the formula downward till to the end of the range to get the results. 

COMPARE TWO COLUMNS IN EXCEL ➢ USING SIMPLE LOGICAL FORMULA (CASE INSENSITIVE)_3

● Read More: 06 Alternative Methods: How to Copy Formula in Excel?

(02) HOW TO COMPARE TWO COLUMNS IN EXCEL USING IF CONDITION (CASE INSENSITIVE)

If required, we can use the IF function to replace TRUE or FALSE with a specific text string. Please keep in mind that the IF formula returns the result based on criteria that may not be case-sensitive, which means criteria text may be upper, lower, proper case doesn’t matter at all. 

Before going to the formula, we will focus on the syntax for the IF function.

if syntax

(01) We can use the IF function when we try to mention TRUE or FALSE. But in this case, we should mention them within double quotation (” “).

So the formula is written as:

=IF(A2=C2,”TRUE”,”FALSE”)

COMPARE TWO COLUMNS IN EXCEL ➢ USING THE IF FORMULA (CASE INSENSITIVE)_1

Then simply press Enter or Ctrl+Enter, which will show either TRUE or FALSE. In this case, it will show TRUE which means the value in cell A2 is equal to the value in cell C2,  otherwise, it will show as FALSE.

COMPARE TWO COLUMNS IN EXCEL ➢ USING THE IF FORMULA (CASE INSENSITIVE)_2

(02) We can use text strings in the IF function. Suppose, if the cell values between A2 and C2 are the same, the logic returns TRUE, then we can decide to replace it with the text “OK” and if the logic is FALSE then it replaces with the text “Not Matched“.

Thereafter the formula is written as:

=IF(A2=C2,”OK”,”Not Matched”)

COMPARE TWO COLUMNS IN EXCEL ➢ USING THE IF FORMULA (CASE INSENSITIVE)_3

Extend the formula downward till to the end of the range to get the results. 

COMPARE TWO COLUMNS IN EXCEL ➢ USING THE IF FORMULA (CASE INSENSITIVE)_4

(03) We can arrange the logic in a different manner and based on the logic we should arrange the arguments respectively. Suppose, if the cell values between A2 and C2 are different, the logic returns TRUE, then we can decide to replace it with the text “Not Matched” and if the logic is FALSE then it is replaced with the text “OK“.

=IF(A2<>C2,”Not Matched”,”OK”)

COMPARE TWO COLUMNS IN EXCEL ➢ USING THE IF FORMULA (CASE INSENSITIVE)_5

(03) HOW TO COMPARE TWO COLUMNS IN EXCEL USING THE EXACT FUNCTION (CASE SENSITIVE)

Often, we don’t need to worry about the case of the text. If we need to make an exact, case-sensitive comparison, though, use the EXACT function.

The syntax for the Exact function is

syntax for the Exact function

(i) The function is case-sensitive and will return a TRUE or FALSE result. It is often used to compare two text strings to determine if they are the same, for example, the following formula returns TRUE only if cells A2 and C2 contain exactly the same entry: 

=EXACT(A2, C2)

COMPARE TWO COLUMNS IN EXCEL ➢ USING THE EXACT FUNCTION (CASE SENSITIVE)_1

Then simply press Enter or Ctrl+Enter, which will show either TRUE or FALSE. In this case, it will show TRUE which means the value in cell A2 is equal to the value in cell C2, otherwise, it will show as FALSE.

Extend the formula downward till to the end of the range to get the results.

COMPARE TWO COLUMNS IN EXCEL ➢ USING THE EXACT FUNCTION (CASE SENSITIVE)_2

Note: When we compare text, be careful with trailing space characters, which are often difficult to identify. The following formula returns FALSE because the first string contains a trailing space:

=EXACT(“AUS-36  “,”AUS-36”)

When extra space is at the end of the text in a cell, it’s impossible to tell that it’s there just by looking at the cell. So if your text comparison formulas don’t seem to be working, a trailing space could be the problem.

(ii) We can use text strings instead of TRUE and FAlSE with help of the IF function. Suppose, if the cell values between A2 and C2 are the same, the logic returns TRUE, then we can decide to replace it with the text “OK” and if the logic is FALSE then it replaces with the text “Not Matched“.

Thereafter the formula is written as:

=IF(EXACT(A2,C2),”OK”,”Not Matched”)

COMPARE TWO COLUMNS IN EXCEL ➢ USING THE EXACT FUNCTION (CASE SENSITIVE)_3

(04) HOW TO COMPARE TWO COLUMNS IN EXCEL USING CONDITIONAL FORMATTING (CASE INSENSITIVE)

We can highlight the rows that have matching data which means if the values of the cells meet a condition with similar values being highlighted. This returns case insensitive results which means both upper cases and lower cases are treated as identical.

(i) At first, select two columns from the entire dataset.

➢ If the columns are contiguous, press Ctrl+Spacebar which will select the single column, and then press Shift+Right arrow (➡) which will select the adjacent column to the right. 

➢ If the columns are non-contiguous, press Ctrl+Spacebar which will select the single column, then hold down the Ctrl key and click the column number which will select another column.

COMPARE TWO COLUMNS IN EXCEL ➢ USING CONDITIONAL FORMATTING (CASE INSENSITIVE)_1

(ii) Go to the Home tab ➪ Click on the Conditional Formatting drop-down arrow in the Styles group ➪ Hover the cursor on the Highlight Cells Rules and as a result, a menu opens to the right ➪ Select the Duplicate Values…

(iii) As a result, a Duplicate Values dialog box opens. By default, ‘Duplicate‘ is selected, and choose any formatting style from the values with drop-down list.

(iv) Finally, click OK or press Enter to accept the condition. 

COMPARE TWO COLUMNS IN EXCEL ➢ USING CONDITIONAL FORMATTING (CASE INSENSITIVE)_2

● Note: On the other hand, if we choose the Unique option it will highlight those cells containing unique values. 

COMPARE TWO COLUMNS IN EXCEL ➢ USING CONDITIONAL FORMATTING (CASE INSENSITIVE)_3

Premium Courses on Coursera

04 Power Tools4&bids=759505

Excel Power Tools for Data Analysis

Bestseller
4.9/5
04 Fundamentals4&bids=759505

Excel Fundamentals for Data Analysis

Bestseller
4.9/5
MA courseimage final 014&bids=916798

Managerial Accounting Fundamentals

Bestseller
4.9/5
Data Analysis Foundations 1200X12004&bids=759505

Data Analysis and Visualization Foundations

Bestseller
4.9/5
ut square logo 14&bids=916798

University Teaching

Bestseller
4.9/5
infra design process4&bids=916798

Reliable Google Cloud Infrastructure: Design and Process

Bestseller
4.9/5
044&bids=759505

Excel Skills for Business

Bestseller
4.9/5
Specialization Certificate Emblem AADS Final4&bids=759505

Advanced Data Science with IBM

Bestseller
4.9/5
Computing Storage Security with GCP4&bids=916798

Essential Google Cloud Infrastructure: Core Services

Bestseller
4.9/5
Aerial Robotics Logo4&bids=916798

Robotics: Aerial Robotics

Bestseller
4.9/5
Inline 9109313224&bids=916798

IBM Cybersecurity Analyst Assessment

Bestseller
4.9/5
GCP Fundamentals Core Infra4&bids=916798

Google Cloud Fundamentals: Core Infrastructure

Bestseller
4.9/5

Premium Courses on Udemy

1162936 2b0f 34&bids=507388

Advanced Excel Skills-How to finish works faster

High Rated
4.9/5
4206250 aab34&bids=507388

Build Amazing Applications: Java Projects Masterclass 2021

Bestseller
4.8/5
3306024 4ffd4&bids=507388

Cisco Certified Network Associate – CCNA 200-301 Exams

Bestseller
4.6/5
4200524 3041 24&bids=507388

Microsoft (DA-100): Analyzing Data with Microsoft Power BI

Bestseller
4.8/5
4187306 6d3d4&bids=507388

The Complete SAS Programming reference

 

Bestseller
4.8/5
3755780 0729 34&bids=507388

Microsoft MS-700: Managing Microsoft Teams (Official Exam)

High Rated
4.8/5
4200368 f71e 54&bids=507388

Javascript For Beginners Complete Course

Bestseller
4.8/5
648826 f0e5 44&bids=507388

The Complete Financial Analyst Course 2021 (Excel, Accounting, Financial Statement Analysis, Business Analysis, Financial Math, PowerPoint: Everything is Included!)

Bestseller
4.8/5
4216772 92944&bids=507388

Latest CCNA 200-301 Practice Test – Try before Real Exam

Top Rated
4.7/5
Read-More-5

Thanks for your interest joining to Advance Excel Forum community.

Something went wrong.

Join Our Community List

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.


Like it? Share with your friends!

Share via

Join Our Community List

Community grow with You. * VERIFY & CONFIRM YOUR EMAIL *

Thanks for your interest joining to Advance Excel Forum community.

Fill the Correct Information.

Thanks for your interest joining to Advance Excel Forum community.

Something went wrong.

Join Our Community List

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

We use cookies to ensure that we give you the best experience on our website (by analyzing).  Please see our cookies page for further details or agree by clicking the 'Accept' button.

 

Cookie settings

Below you can choose which kind of cookies you allow on this website. Click on the "Save cookie settings" button to apply your choice.

FunctionalOur website uses functional cookies. These cookies are necessary to let our website work.

AnalyticalOur website uses analytical cookies to make it possible to analyze our website and optimize for the purpose of a.o. the usability.

Social mediaOur website places social media cookies to show you 3rd party content like YouTube and FaceBook. These cookies may track your personal data.

AdvertisingOur website places advertising cookies to show you 3rd party advertisements based on your interests. These cookies may track your personal data.

OtherOur website places 3rd party cookies from other 3rd party services which aren't Analytical, Social media or Advertising.