Comparing data in two columns in Google Sheets is essential for data analysis, verification, and reconciliation. With COMPARE.EDU.VN, you can quickly identify matches, discrepancies, and duplicates between two sets of data. This guide provides comprehensive methods and formulas to efficiently compare data, highlight differences, and extract valuable insights, enhancing your data management capabilities.
1. What Is the Simplest Method to Compare Two Columns in Google Sheets?
The simplest method to compare two columns in Google Sheets involves using the IF
and MATCH
functions. This approach quickly identifies matches and non-matches between the two columns.
Step-by-Step Guide:
-
Open Your Google Sheet: Open the Google Sheet containing the data you want to compare.
-
Select the First Cell: Select the first cell in a new column where you want the comparison results to appear (e.g., cell C2).
-
Enter the Formula: Enter the following formula into the cell:
=IF(ISNA(MATCH(A2,B:B,0)), "Not Found", "Found")
A2
is the first cell in the first column you want to compare.B:B
is the entire second column you want to compare against.MATCH(A2,B:B,0)
searches for the value inA2
within columnB
. If found, it returns the relative position of the match; otherwise, it returns an error.ISNA()
checks if the result ofMATCH
is an error (i.e., the value was not found).IF()
returns “Not Found” if the value is not in the second column and “Found” if it is.
-
Apply the Formula to the Entire Column: Drag the fill handle (the small square at the bottom-right of the cell) down to apply the formula to all the rows you want to compare. Alternatively, you can copy the formula and paste it into the desired range of cells.
Example:
Suppose you have two columns, A and B, with the following data:
Column A | Column B | Column C (Result) |
---|---|---|
Apple | Banana | Not Found |
Banana | Orange | Found |
Orange | Apple | Found |
Grape | Grape | Not Found |
In this example, the formula in column C compares each value in column A to column B and indicates whether it is “Found” or “Not Found.”
Advantages:
- Simplicity: Easy to understand and implement.
- Speed: Quick for small to medium-sized datasets.
Disadvantages:
- Basic Comparison: Only identifies matches and non-matches without providing additional information like the number of occurrences or differences.
- Case-Sensitive: The
MATCH
function is case-sensitive, so “Apple” and “apple” will be treated as different values.
This simple method is useful for quickly identifying whether a value in one column exists in another, making it a great starting point for more complex data comparisons in Google Sheets. For more in-depth analysis, consider using more advanced formulas and techniques, as provided by COMPARE.EDU.VN.
2. How Can You Highlight Matching Rows in Two Columns in Google Sheets?
Highlighting matching rows in two columns in Google Sheets can be achieved using Conditional Formatting. This method allows you to visually identify rows where the values in specified columns match, making it easier to analyze and interpret your data.
Step-by-Step Guide:
-
Select the Data Range: Select the entire range of data you want to format, including both columns you are comparing (e.g., A1:B100).
-
Open Conditional Formatting: Go to “Format” in the menu, then click on “Conditional formatting.” This will open the Conditional Formatting sidebar on the right.
-
Set the Formatting Rules:
-
Under “Apply to range,” ensure that the correct range is selected (e.g., A1:B100).
-
In the “Format rules” section, under “Format cells if,” select “Custom formula is.”
-
Enter the following formula in the formula box:
=$A1=$B1
$A1
refers to the first cell in the first column. The$
sign ensures that the column remains fixed when the formatting is applied to other rows.$B1
refers to the first cell in the second column, similarly fixed.- The formula checks if the value in the first cell of column A is equal to the value in the first cell of column B.
-
Choose the formatting style you want to apply to the matching rows. Click on the “Formatting style” section and select a fill color, text color, or other formatting options.
-
-
Apply the Rule: Click “Done” to apply the conditional formatting rule.
Example:
Suppose you have two columns, A and B, with the following data:
Column A | Column B |
---|---|
Apple | Apple |
Banana | Orange |
Orange | Orange |
Grape | Kiwi |
After applying the conditional formatting rule, the rows where the values in column A and column B match (i.e., “Apple” in row 1 and “Orange” in row 3) will be highlighted.
Additional Tips:
-
Case Sensitivity: Conditional formatting is case-insensitive by default. If you need a case-sensitive comparison, use the
EXACT
function in your custom formula:=EXACT($A1,$B1)
This formula will only highlight rows where the values match exactly, including case.
-
Multiple Columns: To compare multiple columns, you can adjust the formula to include additional conditions. For example, to highlight rows where columns A, B, and C all match, use:
=AND($A1=$B1, $A1=$C1)
-
Different Ranges: If you want to apply the formatting to a different range than the columns being compared, adjust the “Apply to range” setting accordingly.
Advantages:
- Visual Identification: Makes it easy to spot matching rows at a glance.
- Customizable: Allows you to choose the formatting style that best suits your needs.
- Dynamic: Automatically updates as the data changes.
Disadvantages:
- Basic Matching: Only highlights exact matches without providing additional information about differences or discrepancies.
- Potential Overload: Can become visually overwhelming with large datasets and numerous matches.
By using Conditional Formatting, you can quickly and effectively highlight matching rows in two columns in Google Sheets, enhancing your ability to analyze and understand your data. For more advanced comparison techniques and detailed insights, explore the resources available at COMPARE.EDU.VN.
3. What Formula Compares Two Columns and Returns Matches in Google Sheets?
To compare two columns and return matches in Google Sheets, you can use a combination of the IF
, ISNUMBER
, and MATCH
functions. This formula identifies values that exist in both columns and returns those matching values in a new column.
Step-by-Step Guide:
-
Open Your Google Sheet: Open the Google Sheet containing the two columns you want to compare.
-
Select the First Cell: Select the first cell in a new column where you want the matching values to appear (e.g., cell C2).
-
Enter the Formula: Enter the following formula into the cell:
=IF(ISNUMBER(MATCH(A2,B:B,0)), A2, "")
A2
is the first cell in the first column you want to compare.B:B
is the entire second column you want to compare against.MATCH(A2,B:B,0)
searches for the value inA2
within columnB
. If found, it returns the relative position of the match; otherwise, it returns an error.ISNUMBER()
checks if the result ofMATCH
is a number, indicating that the value was found in columnB
.IF()
returns the value fromA2
if it is found in columnB
and returns an empty string (""
) if it is not found.
-
Apply the Formula to the Entire Column: Drag the fill handle (the small square at the bottom-right of the cell) down to apply the formula to all the rows you want to compare. Alternatively, you can copy the formula and paste it into the desired range of cells.
Example:
Suppose you have two columns, A and B, with the following data:
Column A | Column B | Column C (Result) |
---|---|---|
Apple | Banana | |
Banana | Orange | Banana |
Orange | Apple | Orange |
Grape | Grape | Grape |
In this example, the formula in column C compares each value in column A to column B and returns the matching values. If a value in column A is not found in column B, the corresponding cell in column C is left blank.
Additional Tips:
-
Returning Values from Column B: If you prefer to return the matching values from column B instead of column A, you can modify the formula as follows:
=IF(ISNUMBER(MATCH(A2,B:B,0)), VLOOKUP(A2,B:B,1,FALSE), "")
This formula uses
VLOOKUP
to find the matching value in column B and return it. -
Handling Errors: If you want to display a specific message instead of an empty string when a value is not found, you can modify the formula like this:
=IF(ISNUMBER(MATCH(A2,B:B,0)), A2, "No Match")
This will return “No Match” in column C for any values in column A that are not found in column B.
-
Case Sensitivity: The
MATCH
function is case-sensitive. For a case-insensitive comparison, you can use theLOWER
function to convert both columns to lowercase before comparing:=IF(ISNUMBER(MATCH(LOWER(A2),ARRAYFORMULA(LOWER(B:B)),0)), A2, "")
This formula converts both the value in
A2
and the values in columnB
to lowercase before comparing them.
Advantages:
- Returns Matching Values: Clearly identifies the values that exist in both columns.
- Customizable: Can be modified to return values from either column or display custom messages.
- Flexible: Works with various types of data, including text, numbers, and dates.
Disadvantages:
- Basic Comparison: Only returns matches without providing additional information like the number of occurrences or differences.
- Potential Errors: Requires careful handling of errors and case sensitivity for accurate results.
By using this formula, you can efficiently compare two columns and return the matching values in Google Sheets, enhancing your data analysis capabilities. For more advanced techniques and comprehensive data management solutions, visit COMPARE.EDU.VN.
4. How Do You Find Differences Between Two Columns in Google Sheets?
Finding the differences between two columns in Google Sheets involves identifying the values that are unique to each column. This can be accomplished using a combination of formulas and functions like IF
, ISNA
, MATCH
, and FILTER
.
Method 1: Identifying Values Unique to Column A
This method identifies values that are present in column A but not in column B.
Step-by-Step Guide:
-
Open Your Google Sheet: Open the Google Sheet containing the two columns you want to compare.
-
Select the First Cell: Select the first cell in a new column where you want the unique values from column A to appear (e.g., cell C2).
-
Enter the Formula: Enter the following formula into the cell:
=IF(ISNA(MATCH(A2,B:B,0)), A2, "")
A2
is the first cell in the first column you want to compare.B:B
is the entire second column you want to compare against.MATCH(A2,B:B,0)
searches for the value inA2
within columnB
. If found, it returns the relative position of the match; otherwise, it returns an error.ISNA()
checks if the result ofMATCH
is an error (i.e., the value was not found).IF()
returns the value fromA2
if it is not found in columnB
and returns an empty string (""
) if it is found.
-
Apply the Formula to the Entire Column: Drag the fill handle (the small square at the bottom-right of the cell) down to apply the formula to all the rows you want to compare. Alternatively, you can copy the formula and paste it into the desired range of cells.
Example:
Suppose you have two columns, A and B, with the following data:
Column A | Column B | Column C (Result) |
---|---|---|
Apple | Banana | Apple |
Banana | Orange | |
Orange | Apple | |
Grape | Grape |
In this example, the formula in column C identifies that “Apple” is unique to column A because it does not appear in column B.
Method 2: Identifying Values Unique to Column B
This method identifies values that are present in column B but not in column A.
Step-by-Step Guide:
-
Select the First Cell: Select the first cell in a new column where you want the unique values from column B to appear (e.g., cell D2).
-
Enter the Formula: Enter the following formula into the cell:
=IF(ISNA(MATCH(B2,A:A,0)), B2, "")
B2
is the first cell in the second column you want to compare.A:A
is the entire first column you want to compare against.MATCH(B2,A:A,0)
searches for the value inB2
within columnA
.ISNA()
checks if the result ofMATCH
is an error (i.e., the value was not found).IF()
returns the value fromB2
if it is not found in columnA
and returns an empty string (""
) if it is found.
-
Apply the Formula to the Entire Column: Drag the fill handle down to apply the formula to all the rows you want to compare.
Example:
Using the same data as before:
Column A | Column B | Column C (Result) | Column D (Result) |
---|---|---|---|
Apple | Banana | Apple | Banana |
Banana | Orange | Orange | |
Orange | Apple | ||
Grape | Grape |
In this example, the formula in column D identifies that “Banana” and “Orange” are unique to column B because they do not appear in column A (excluding the “Orange” that appears in column A).
Method 3: Using FILTER to List Unique Values
This method uses the FILTER
function to create a list of unique values from each column.
Step-by-Step Guide:
-
For Unique Values in Column A:
-
Enter the following formula in a cell where you want the list of unique values from column A to start:
=FILTER(A:A, ISNA(MATCH(A:A, B:B, 0)))
-
-
For Unique Values in Column B:
-
Enter the following formula in a cell where you want the list of unique values from column B to start:
=FILTER(B:B, ISNA(MATCH(B:B, A:A, 0)))
-
Explanation:
FILTER(A:A, condition)
returns all values from column A that meet the specified condition.ISNA(MATCH(A:A, B:B, 0))
creates a condition that checks if each value in column A is not found in column B.
Advantages:
- Clear Identification: Clearly identifies values unique to each column.
- Versatile: Can be adapted to different types of data, including text, numbers, and dates.
- Comprehensive: Provides a complete list of differences between the two columns.
Disadvantages:
- Complexity: Requires a good understanding of Google Sheets functions.
- Potential Errors: Can be prone to errors if the formulas are not entered correctly.
- Case Sensitivity: The
MATCH
function is case-sensitive, so “Apple” and “apple” will be treated as different values.
By using these methods, you can efficiently find the differences between two columns in Google Sheets, enhancing your data analysis capabilities. For more advanced techniques and comprehensive data management solutions, visit COMPARE.EDU.VN.
5. How Can You Count Matches Between Two Columns in Google Sheets?
Counting the number of matches between two columns in Google Sheets can be achieved using the COUNTIF
or SUMPRODUCT
functions. These methods allow you to determine how many values in one column are also present in another.
Method 1: Using COUNTIF
The COUNTIF
function counts the number of cells within a range that meet a given criterion.
Step-by-Step Guide:
-
Open Your Google Sheet: Open the Google Sheet containing the two columns you want to compare.
-
Select the First Cell: Select the first cell in a new column where you want the count of matches to appear (e.g., cell C2).
-
Enter the Formula: Enter the following formula into the cell:
=COUNTIF(B:B, A2)
B:B
is the entire second column you want to compare against.A2
is the first cell in the first column you want to check for matches.COUNTIF(B:B, A2)
counts the number of times the value inA2
appears in columnB
.
-
Apply the Formula to the Entire Column: Drag the fill handle (the small square at the bottom-right of the cell) down to apply the formula to all the rows you want to compare. Alternatively, you can copy the formula and paste it into the desired range of cells.
Example:
Suppose you have two columns, A and B, with the following data:
Column A | Column B | Column C (Result) |
---|---|---|
Apple | Banana | 0 |
Banana | Orange | 1 |
Orange | Apple | 1 |
Grape | Grape | 1 |
In this example, the formula in column C counts how many times each value in column A appears in column B. For example, “Banana” appears once in column B, so the result in column C is 1.
Method 2: Using SUMPRODUCT and COUNTIF
The SUMPRODUCT
function multiplies corresponding components in the given arrays and returns the sum of those products. Combined with COUNTIF
, it can provide a total count of matches.
Step-by-Step Guide:
-
Select a Cell: Select a cell where you want to display the total count of matches (e.g., cell C1).
-
Enter the Formula: Enter the following formula into the cell:
=SUMPRODUCT(COUNTIF(B:B, A:A))
B:B
is the entire second column you want to compare against.A:A
is the entire first column you want to check for matches.COUNTIF(B:B, A:A)
returns an array of counts, where each count represents how many times each value in column A appears in column B.SUMPRODUCT()
sums up all the counts in the array, giving you the total number of matches.
Example:
Using the same data as before:
Column A | Column B |
---|---|
Apple | Banana |
Banana | Orange |
Orange | Apple |
Grape | Grape |
The formula =SUMPRODUCT(COUNTIF(B:B, A:A))
in cell C1 would return 3, because there are three matches in total (Banana, Orange, and Grape).
Method 3: Counting Unique Matches
If you want to count only the unique matches between the two columns, you can use a combination of UNIQUE
, FILTER
, and COUNT
.
Step-by-Step Guide:
-
Create a List of Unique Matches:
-
Enter the following formula in a cell where you want the list of unique matches to start:
=UNIQUE(FILTER(A:A, COUNTIF(B:B, A:A)>0))
FILTER(A:A, COUNTIF(B:B, A:A)>0)
filters column A to include only values that appear in column B.UNIQUE()
returns only the unique values from the filtered list.
-
-
Count the Unique Matches:
-
Enter the following formula in a cell where you want the count of unique matches to appear:
=COUNT(UNIQUE(FILTER(A:A, COUNTIF(B:B, A:A)>0)))
- This formula counts the number of unique matches between the two columns.
-
Advantages:
- Accurate Counting: Provides accurate counts of matches between two columns.
- Versatile: Can be used to count total matches or unique matches.
- Easy to Use: The
COUNTIF
function is straightforward and easy to understand.
Disadvantages:
- Case Sensitivity: The
COUNTIF
function is case-insensitive by default. For a case-sensitive comparison, you may need to use more complex formulas. - Potential Errors: Requires careful handling of errors and understanding of the functions used.
- Resource Intensive: Can be resource-intensive with very large datasets.
By using these methods, you can efficiently count the matches between two columns in Google Sheets, enhancing your data analysis capabilities. For more advanced techniques and comprehensive data management solutions, visit COMPARE.EDU.VN.
6. How Do You Compare Two Columns for Partial Match in Google Sheets?
Comparing two columns for a partial match in Google Sheets involves determining if a portion of a value in one column exists within a value in another column. This can be achieved using functions like IF
, ISNUMBER
, and SEARCH
(or FIND
for case-sensitive comparisons).
Step-by-Step Guide:
-
Open Your Google Sheet: Open the Google Sheet containing the two columns you want to compare.
-
Select the First Cell: Select the first cell in a new column where you want the partial match results to appear (e.g., cell C2).
-
Enter the Formula: Enter the following formula into the cell:
=IF(ISNUMBER(SEARCH(A2,B2)), "Partial Match", "No Match")
A2
is the first cell in the first column you want to check for a partial match.B2
is the first cell in the second column you want to search within.SEARCH(A2, B2)
searches for the value inA2
within the value inB2
. If found, it returns the starting position of the match; otherwise, it returns an error.ISNUMBER()
checks if the result ofSEARCH
is a number, indicating that a partial match was found.IF()
returns “Partial Match” if a partial match is found and “No Match” if it is not.
-
Apply the Formula to the Entire Column: Drag the fill handle (the small square at the bottom-right of the cell) down to apply the formula to all the rows you want to compare. Alternatively, you can copy the formula and paste it into the desired range of cells.
Example:
Suppose you have two columns, A and B, with the following data:
Column A | Column B | Column C (Result) |
---|---|---|
App | Apple | Partial Match |
Ban | Banana | Partial Match |
Ora | Orange Juice | Partial Match |
Gra | Grapefruit | Partial Match |
Pea | Peach Cobbler | No Match |
In this example, the formula in column C checks if the value in column A is a partial match for the value in column B. For example, “App” is a partial match for “Apple,” so the result in column C is “Partial Match.”
Additional Tips:
-
Case Sensitivity: The
SEARCH
function is case-insensitive. For a case-sensitive comparison, use theFIND
function instead:=IF(ISNUMBER(FIND(A2,B2)), "Partial Match", "No Match")
The
FIND
function works similarly toSEARCH
but is case-sensitive. -
Checking Multiple Columns: If you want to check for a partial match in multiple columns, you can use the
ARRAYFORMULA
function:=ARRAYFORMULA(IF(ISNUMBER(SEARCH(A2,B:B)), "Partial Match", "No Match"))
This formula checks if the value in
A2
is a partial match for any value in columnB
. Note that this will return “Partial Match” if any cell in column B contains the value in A2. -
Handling Errors: If you want to display a specific message instead of “No Match” when a partial match is not found, you can modify the formula like this:
=IF(ISNUMBER(SEARCH(A2,B2)), "Partial Match", "Not Found")
This will return “Not Found” in column C for any values in column A that are not found as a partial match in column B.
Advantages:
- Flexible Matching: Allows for partial matching, which is useful when exact matches are not required.
- Customizable: Can be modified to perform case-sensitive or case-insensitive comparisons.
- Versatile: Works with various types of data, including text, numbers, and dates.
Disadvantages:
- Complexity: Requires a good understanding of Google Sheets functions.
- Potential Errors: Can be prone to errors if the formulas are not entered correctly.
- Resource Intensive: Can be resource-intensive with very large datasets.
By using these methods, you can efficiently compare two columns for a partial match in Google Sheets, enhancing your data analysis capabilities. For more advanced techniques and comprehensive data management solutions, visit COMPARE.EDU.VN.
7. How Do You Compare Data In Two Columns With Different Lengths in Google Sheets?
Comparing data in two columns with different lengths in Google Sheets requires a strategy to ensure that all values in the shorter column are compared against the appropriate values in the longer column. This can be accomplished using formulas with functions like IF
, ISNA
, MATCH
, VLOOKUP
, and ARRAYFORMULA
.
Method 1: Comparing Each Value in the Shorter Column to the Entire Longer Column
This method checks if each value in the shorter column exists anywhere in the longer column.
Step-by-Step Guide:
-
Open Your Google Sheet: Open the Google Sheet containing the two columns you want to compare.
-
Identify the Shorter and Longer Columns: Determine which column has fewer rows (shorter) and which has more (longer).
-
Select the First Cell: Select the first cell in a new column next to the shorter column where you want the comparison results to appear (e.g., cell C2, assuming column A is shorter).
-
Enter the Formula: Enter the following formula into the cell:
=IF(ISNA(MATCH(A2,B:B,0)), "Not Found", "Found")
A2
is the first cell in the shorter column you want to compare.B:B
is the entire longer column you want to compare against.MATCH(A2,B:B,0)
searches for the value inA2
within columnB
. If found, it returns the relative position of the match; otherwise, it returns an error.ISNA()
checks if the result ofMATCH
is an error (i.e., the value was not found).IF()
returns “Not Found” if the value is not in the longer column and “Found” if it is.
-
Apply the Formula to the Entire Shorter Column: Drag the fill handle (the small square at the bottom-right of the cell) down to apply the formula to all the rows in the shorter column. Alternatively, you can copy the formula and paste it into the desired range of cells.
Example:
Suppose you have two columns, A (shorter) and B (longer), with the following data:
Column A | Column B | Column C (Result) |
---|---|---|
Apple | Apple | Found |
Banana | Banana | Found |
Orange | Orange | Found |
Grape | ||
Kiwi | ||
Mango |
In this example, the formula in column C compares each value in column A to the entire column B and indicates whether it is “Found” or “Not Found.”
Method 2: Comparing Corresponding Rows Up to the Length of the Shorter Column
This method compares values in corresponding rows for the length of the shorter column and indicates if they match.
Step-by-Step Guide:
-
Select the First Cell: Select the first cell in a new column next to the shorter column where you want the comparison results to appear (e.g., cell C2).
-
Enter the Formula: Enter the following formula into the cell:
=IF(A2=B2, "Match", "No Match")
A2
is the first cell in the shorter column you want to compare.B2
is the first cell in the longer column you want to compare against.IF()
checks if the value inA2
is equal to the value inB2
and returns “Match” if they are equal and “No Match” if they are not.
-
Apply the Formula to the Length of the Shorter Column: Drag the fill handle down to apply the formula to all the rows in the shorter column.
Example:
Using the same data as before:
Column A | Column B | Column C (Result) |
---|---|---|
Apple | Apple | Match |
Banana | Banana | Match |
Orange | Orange | Match |
In this example, the formula in column C compares each value in column A to the corresponding value in column B and indicates whether they “Match” or “No Match.”
Method 3: Using ARRAYFORMULA for a More Comprehensive Comparison
This method uses ARRAYFORMULA
to apply a more complex comparison across the entire shorter column.
Step-by-Step Guide:
-
Select the First Cell: Select the first cell in a new column where you want the comparison results to appear (e.g., cell C1).
-
Enter the Formula: Enter the following formula into the cell:
=ARRAYFORMULA(IF(ROW(A:A)<=COUNTA(A:A), IF(ISNA(MATCH(A:A,B:B,0)), "Not Found", "Found"), ""))
ROW(A:A)
returns the row number for each cell in column A.COUNTA(A:A)
counts the number of non-empty cells in column A.IF(ROW(A:A)<=COUNTA(A:A), condition, "")
ensures the formula only applies to rows within the length of column A.ISNA(MATCH(A:A,B:B,0))
checks if each value in column A is found in column B.IF(ISNA(MATCH(A:A,B:B,0)), "Not Found", "Found")
returns “Not Found” if the value is not in column B and “Found” if it is.
-
Apply the Formula: The
ARRAYFORMULA
automatically applies the formula to the entire column.
Advantages:
- Flexible: Can handle columns of different lengths.
- Comprehensive: Provides options for comparing each value in the shorter column to the entire longer column or just corresponding rows.
- Dynamic: Automatically adjusts as data is added or removed.
Disadvantages:
- Complexity: Requires a good understanding of Google Sheets functions.
- Potential Errors: Can be prone to errors if the formulas are not entered correctly.
- Resource Intensive: Can be resource-intensive with very large datasets.
By using these methods, you can efficiently compare data in two columns with different lengths in Google Sheets, enhancing your data analysis capabilities. For more advanced techniques and comprehensive data management solutions, visit compare.edu.vn.
8. How Do You Highlight Duplicate Values in Two Columns in Google Sheets?
Highlighting duplicate values in two columns in Google Sheets helps in identifying common entries across both columns, which is crucial for data cleaning, analysis, and reconciliation. This can be achieved using Conditional Formatting with custom formulas.
Step-by-Step Guide:
-
Open Your Google Sheet: Open the Google Sheet containing the two columns you want to compare.
-
Select the Data Range: Select the entire range of data you want to format, including both columns you are comparing (e.g., A1:B100).
-
Open Conditional Formatting: Go to “Format” in the menu, then click on “Conditional formatting.” This will open the Conditional Formatting sidebar on the right.
-
Set the Formatting Rules:
-
Under “Apply to range,” ensure that the correct range is selected (e.g., A1:B100).
-
In the “Format rules” section, under “Format cells if,” select “Custom formula is.”
-
Enter the following formula in the formula box:
=COUNTIF(A:B,A1)>1
A:B
refers to the entire range of both columns.A1
refers to the first cell in the selected range.
-