Excel Compare Two Columns Case Sensitive: Flag SKU Mismatches with EXACT

When you need to Excel compare two columns case sensitive, use EXACT. A normal equality check can make codes that differ only by upper- and lowercase letters appear equal. That is risky when a product, account, or system identifier treats INV-Ab8 and inv-ab8 as separate values.

Quick answer: Excel compare two columns case sensitive

To compare two Excel columns case-sensitively on the same row, enter =EXACT(A2,B2) in C2 and fill down. The formula returns TRUE only when the two SKU codes have identical characters and capitalization.

Use this for a row-by-row validation where column A is the approved value and column B is the received value in the corresponding row. For lists that are not already paired by row, start with this guide to compare two Excel lists to identify the records that need pairing.

Set up a case-sensitive SKU comparison

Assume an inventory team has an approved SKU export and a received export. The columns have been placed in the same order, so each row represents the same intended record. Add a third column called Case-sensitive match?.

Row Approved SKU (A) Received SKU (B) Case-sensitive match? (C)
2 INV-Ab7 INV-Ab7 TRUE
3 INV-Ab8 inv-ab8 FALSE
4 ORD-X19 ORD-X19 TRUE
5 RET-Q4 RET-Q4 TRUE

Compare the columns in three steps

  1. Put approved codes in column A and received codes in column B. Keep the intended pairs on the same rows.
  2. In C2, enter =EXACT(A2,B2) and press Enter.
  3. Copy the formula down column C. Filter column C for FALSE to review the exceptions.

In the sample below, Approved SKU in A2 is INV-Ab7 and Received SKU in B2 is INV-Ab7. In A3, Approved SKU is INV-Ab8 while Received SKU is inv-ab8.

Enter =EXACT(A2,B2) in C2, press Enter, then drag the fill handle down the Status column. Filter the results for FALSE before accepting the received export.

C2 returns TRUE because INV-Ab7 matches INV-Ab7 exactly. C3 returns FALSE because INV-Ab8 and inv-ab8 differ only in capitalization.

What the formula checks

EXACT has two arguments: the first text value and the second text value. In =EXACT(A2,B2), Excel compares the contents of A2 with B2 character by character, including letter case. Microsoft describes EXACT as a case-sensitive text comparison that returns TRUE for an exact match and FALSE otherwise.

EXACT compares two text strings in the same row; it does not find a SKU elsewhere in another list. It is also case-sensitive but ignores formatting differences, so a different font color or cell format does not make a value different.

Make FALSE results easier to act on

A TRUE/FALSE column is useful for filtering, but a plain-language status can be easier to hand off. In C2, use:

=IF(EXACT(A2,B2),"Match","Check")

Copy it down, then filter for Check. This formula has the same comparison logic: it simply turns the Boolean result into a review label. Correct the received code, or document why the capitalization is intentionally different, before the records are accepted.

Boundary cases and common mistakes

Case-only differences must remain visible

A case-only difference is still a mismatch: =EXACT("INV-Ab8","inv-ab8") returns FALSE, so correct the received code or confirm that the two codes are intentionally distinct.

Spaces are characters too

An extra internal space is also a mismatch: =EXACT("INV AB7","INV AB7") returns FALSE. Remove the unintended space at the source or clean the text before using the comparison. Do not remove spaces blindly when a space can be a meaningful part of an identifier.

Why COUNTIF is not suitable here

Do not substitute COUNTIF for this check. COUNTIF criteria are not case-sensitive, so it can treat differently capitalized text as a match. Microsoft specifically notes this behavior in its COUNTIF guidance. COUNTIF answers whether a value meets a criterion in a range; it is not the right test for case-sensitive, same-row text validation.

Do not compare unaligned lists row by row

If one export has missing rows, duplicates, or a different sort order, row 2 may not correspond to row 2 in the other file. In that situation, first reconcile the lists and establish the intended pairs. This overview of how to reconcile two Excel lists is the better next step. Once each pair is aligned, apply EXACT to validate the capitalization.

Compatibility and fallback

Microsoft documents EXACT for Excel for Microsoft 365, Excel 2024, Excel 2021, Excel 2019, and Excel 2016, including corresponding listed Mac releases. If a workbook must be reviewed outside Excel, add a Status label with =IF(EXACT(A2,B2),"Match","Check") so the result is explicit.

Sources

Worked example details and boundary cases

If the approved and received lists are not aligned row by row, use a list-reconciliation method to locate records first; then use EXACT to validate the paired values.

Practice with the exact example data

Use a separate blank worksheet for each example. Enter each value at its listed cell address, then type the formula in AA1. Quoted text is shown in JSON notation to preserve spaces: enter the characters inside the quotes, without the quotes, using a leading apostrophe to keep text and spaces literal. An empty quoted string means an explicit empty text value; use an apostrophe entry where appropriate. Compare your result with the expected result below. These are synthetic practice data.

Example 1 — Main case

Cell Input value
A1 "INV-Ab7"
B1 "INV-Ab7"

Formula in AA1: =EXACT(A1,B1)

Expected result: true

Example 2 — Boundary case

Cell Input value
A1 "INV-Ab8"
B1 "inv-ab8"

Formula in AA1: =EXACT(A1,B1)

Expected result: false

These examples were checked with a limited calculator supporting numeric aggregates, ASCII text functions, exact criteria and exact first-match XLOOKUP. Only the displayed examples and supported semantics were calculated. They were not executed in Microsoft Excel. This check does not verify every claim in the article.

Prepared with automated drafting and review, official references, and a limited example calculator. Synthetic examples are provided for practice; no independent human review or Microsoft Excel execution is claimed.

1 thought on “Excel Compare Two Columns Case Sensitive: Flag SKU Mismatches with EXACT”

  1. Pingback: Excel COUNTIF Find Duplicate Values in One Imported Order-ID List

Leave a Reply

Your email address will not be published. Required fields are marked *