Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • How to get relative row numbers in a range in Excel
  • How to get first column number in range in Excel
  • How to use Excel ROW Function
  • Count rows that contain specific values in Excel
  • How to use Excel INDIRECT Function

Data Analysis Examples

  • How to Create Column Chart in Excel
  • How to Create Gantt Chart in Excel
  • How To Perform and Interpret Regression Analysis in Excel
  • How To Insert and Customize Sparklines in Excel
  • How to calculate average last N values in a table in Excel

Data Validation Examples

  • Excel Data validation with conditional list
  • Excel Data validation date in next 30 days
  • Data validation must not exist in list
  • Excel Data validation must begin with
  • Excel Data validation number multiple 100

Check if multiple cells have same value with case sensitive in Excel

by

To verify that multiple cells have the same value with a case-sensitive formula, you can use a simple array formula based on the EXACT and AND functions. See example below:

Formula

{=AND(EXACT(range,value))}

Explanation

In the example shown, the formula in G5 is:

=AND(EXACT(B5:F5,B5))

This is an array formula and must be entered with control + shift + enter

Worked Example:   Highlight duplicate rows in Excel

How this formula works

This formula uses the EXACT formula to compare a range of cells to a single value:

=EXACT(B5:F5,B5)

Because we give EXACT a range of values in the first argument, we get back an array result containing TRUE FALSE values:

{TRUE,FALSE,TRUE,TRUE,TRUE}

This array goes into the AND function, which returns TRUE only if all values in the array are TRUE.

Worked Example:   Count cells that contain odd numbers in Excel

Ignore empty cells

To ignore empty cells, but still treat non-empty cells in a case-sensitive manner, you can use a version of the formula based on SUMPRODUCT:

=SUMPRODUCT(--(EXACT(range,value)))=COUNTA(range)

Here, we count exact matches using the same EXACT formula above, get a total count with SUMPRODUCT, and compare the result to a count of all non-empty cells, determined by COUNTA.

Worked Example:   How to test for all values in a range are at least in Excel

This is an array formula but control + shift + enter is not required because SUMPRODUCT handles the array natively.

Post navigation

Previous Post:

Check if range contains a value not in another range in Excel

Next Post:

How to test a range for numbers in Excel

Leave a Reply Cancel reply

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

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • How to extract domain name from URL in Excel
  • Join first and last name — Manipulating NAMES in Excel
  • Change Case: Uppercase, Lowercase, Propercase in Excel
  • How to Remove Leading Spaces in Excel
  • How to remove trailing slash from url in Excel
  • Calculate retirement date in Excel
  • NOW function: Description, Usage, Syntax, Examples and Explanation
  • TIMEVALUE function: Description, Usage, Syntax, Examples and Explanation
  • Calculate expiration date in Excel
  • MONTH function: Description, Usage, Syntax, Examples and Explanation
  • ODDLYIELD function: Description, Usage, Syntax, Examples and Explanation
  • ACCRINT function: Description, Usage, Syntax, Examples and Explanation
  • Example of Future value of annuity in Excel
  • CUMIPMT function: Description, Usage, Syntax, Examples and Explanation
  • YIELD function: Description, Usage, Syntax, Examples and Explanation
Acronyms, Abbreviations, Initialism & What They Stand For
© 2022 xlsoffice . All Right Reserved. | Teal Smiles