logo
search
Function Problems

Excel Formula to Check if a Value Exists in a Range

Huma Ashraf ChHuma Ashraf Ch Sep 27, 2026 868 views

Question details

The user needs a way to verify if a specific value appears within a designated list or range of cells and output a logical TRUE or FALSE result.

How to Check if a Value Exists in a Data Range Using Excel Formulas
Product
Excel / WPS Spreadsheet
Device & OS
not provided
Scenario
Cross-referencing data and validating whether particular entries are present in an existing dataset.
Observed behavior
The goal is to generate a logical TRUE when the target value is found in the array and FALSE when it is missing.
Before you start

Identify the target value you want to look up and make note of the exact cell range where the search will be performed before applying your formulas.

Solution 1Recommended

Use the COUNTIF Formula

The COUNTIF function is the most straightforward way to count occurrences of a value and convert that count into a TRUE or FALSE statement.

By counting how many times a value appears in a range and checking if that number is greater than zero, you can easily create a logical check.

1
Select the output cell

Click on the empty cell where you want the TRUE or FALSE result to be displayed.

2
Enter the COUNTIF formula

Type the formula =COUNTIF(B2:B100, A2)>0 into the formula bar. In this example, B2:B100 represents the range you are searching through, and A2 is the value you are trying to find.

3
Execute the formula

Press the Enter key. The cell will display TRUE if the value exists at least once in the specified range, or FALSE if it does not.

Use the COUNTIF Formula
Case Sensitivity: The COUNTIF function is not case-sensitive. Text such as 'apple' and 'APPLE' will be treated as the exact same value.
Efficient Data Analysis with WPS Office

Easily Check Values and Manage Data with WPS Spreadsheet

WPS Spreadsheet fully supports advanced logical formulas like COUNTIF, ISNUMBER, and MATCH. You can seamlessly analyze data, check for duplicates, and validate information just as you would in Microsoft Excel.

  1. 1. Open your data file: Launch WPS Spreadsheet and open the document containing the data range you want to check.
  2. 2. Start your formula: Click on the target cell and type =COUNTIF( to begin, or use the Formulas tab to insert the function automatically.
  3. 3. Input the parameters: Select your search range with your mouse, type a comma, select your lookup value cell, and complete the formula by typing )>0.
  4. 4. View the result: Press Enter to instantly evaluate the data and see your TRUE or FALSE logical result.
100% compatible with Microsoft Excel formulas and file formats (.xlsx, .xls)Lightweight architecture ensures smooth performance on all devicesBuilt-in extensive formula library with step-by-step syntax guidanceCompletely free to use for daily data analysis and spreadsheet formatting
microsoft office alternative - wps office

Frequently Asked Questions

Can I make the formula case-sensitive when checking if a value exists?

Yes. Instead of using COUNTIF, you can use an array formula with the EXACT function, such as =OR(EXACT(A2, B2:B100)). This will only return TRUE if the text matches exactly, including all uppercase and lowercase letters.

How do I check if a value exists in a different worksheet?

You can include the sheet name in your range reference. For example, typing =COUNTIF(Sheet2!B2:B100, A2)>0 will check if the value in cell A2 exists within the B2:B100 range of Sheet2.

Why is my COUNTIF formula returning FALSE even though the value is in the range?

This usually happens due to formatting inconsistencies or hidden spaces. Ensure there are no trailing or leading spaces in your data cells. You can use the TRIM function to clean your data before running the comparison.