When working with large datasets, Excel’s lookup functions like VLOOKUP, XLOOKUP, and INDEX-MATCH are highly effective — but by default, they ignore case sensitivity.

That means Excel treats:

  • “vamshi”

  • “Vamshi”

  • “VAMSHI”
    as the same text, which may lead to incorrect results in data analytics, reporting, or automation workflows.

But don’t worry! In this blog, you will learn a simple and powerful way to perform a case-sensitive lookup in Excel using:

XLOOKUP + EXACT Function


⭐ Why Case-Sensitive Lookup Matters

In real-world datasets, especially in Data Analytics, names, IDs, and codes can be case-dependent:

  • Product codes like AB12 vs ab12

  • Customer IDs like Cust01 vs CUST01

  • Tags, tracking codes, or log files

Case sensitivity ensures that you fetch exactly the right record without mixing similar entries.


๐Ÿงฉ Excel Formula for Case-Sensitive Lookup

Here is the exact formula you used — and it’s one of the BEST ways to achieve a case-sensitive lookup:

๐Ÿ” Formula:

=XLOOKUP(TRUE, EXACT(A20, A1:A10), B1:B10)


๐Ÿง  How This Formula Works

1️⃣ EXACT(A20, A1:A10)

  • The EXACT function compares each value in A1:A10 with A20

  • Returns TRUE only when the text matches exactly — including case

2️⃣ XLOOKUP(TRUE, …)

  • XLOOKUP searches for the first TRUE value returned by EXACT

  • Once it finds the match, it fetches the corresponding data from B1:B10

    ๐Ÿ“Œ Example

    A (Names)B (City)
    vamshiHyderabad
    VamshiPune
    VAMSHIBangalore

    If you type Vamshi in A20 and run the formula, Excel returns:

    ๐Ÿ‘‰ Pune
    because only the second entry matches the case exactly.


    ๐Ÿ’ก Key Benefits

    ✔ Works perfectly for case-sensitive scenarios
    ✔ More accurate than standard XLOOKUP
    ✔ Simple & clean formula
    ✔ Avoids array-entered formulas (old Ctrl+Shift+Enter style)


    ๐Ÿš€ Use-Cases for Data Analysts

    • Matching case-sensitive product IDs

    • Handling email usernames

    • Differentiating encrypted strings / tokens

    • Case-based categorization

    • Advanced Excel automation tasks


    ๐ŸŽฅ Watch the YouTube Short

    If you're coming from YouTube or want a quick 30-second explanation, check out the short on my channel Datawiz Vamshi.


    ๐Ÿ“š Final Thoughts

    The combination of EXACT + XLOOKUP is one of the most powerful (and underrated) tricks in Excel.
    If you’re preparing for jobs in Data Analytics, MIS, Reporting, or BI, mastering these lookup variations will give you a strong advantage.