Formula Generator | Excel

Excel Formula for Column Value Comparison

This guide explains how to use the IF function in Excel to compare values in two columns and indicate results in a third column, helping users quickly identify matches and discrepancies.


Empty image or helper icon

Prompt

Compare values in two columns A and B and specify match or not match in column C?

Answer

Excel Formula for Value Comparison

Objective

To compare values in two columns (A and B) and specify whether they match or do not match in a third column (C).

Formula

The following Excel formula can be entered in cell C1 and dragged down to apply to other rows:

=IF(A1=B1, "Match", "Not Match")

Explanation

  • IF Function:

    • The IF function checks whether a condition is true or false.
    • Syntax: IF(condition, value_if_true, value_if_false).
  • Condition (A1=B1):

    • This is the comparison between the values in column A and column B for the current row.
    • If the values are equal, the condition returns TRUE; otherwise, it returns FALSE.
  • value_if_true ("Match"):

    • If the condition is true (the values match), the formula returns "Match".
  • value_if_false ("Not Match"):

    • If the condition is false (the values do not match), the formula returns "Not Match".

Practical Example

Scenario

Assume the data in columns A and B are as follows:

A B C
100 100
200 150
300 300
400 450
500 500

Application

  1. Input: Place the formula =IF(A1=B1, "Match", "Not Match") in cell C1.
  2. Output: Drag the fill handle down from cell C1 to populate column C. The results will appear as follows:
A B C
100 100 Match
200 150 Not Match
300 300 Match
400 450 Not Match
500 500 Match

Summary

This formula efficiently determines matches between two columns, enabling users to quickly identify discrepancies. For further exploration into Excel functionalities and advanced techniques, the Enterprise DNA Platform offers valuable resources and courses.

Create your Thread using our flexible tools, share it with friends and colleagues.

Your current query will become the main foundation for the thread, which you can expand with other tools presented on our platform. We will help you choose tools so that your thread is structured and logically built.

Description

This guide explains how to use the IF function in Excel to compare values in two columns and indicate results in a third column, helping users quickly identify matches and discrepancies.