Skip to main content

Excel Formula: Check if cell contains all of many things

Author: Sun Last Modified: 2019-12-23

Supposing in Excel, there is a list of values in column E, you want to check if the cells in column B contain all of the values in column E, and return TRUE or FALSE as below screenshot shown. Here in this tutorial, it provides a formula to solve this task.
doc check if cell contain all of many things 1

Generic formula:



Things: the list of values that you want to use to check if argument text contains.
Text: the cell or text string you want to check if containing argument things.

Return value:

This formula returns logical value, FALSE: the cell does not contain all of things; TRUE:the cell contains all of things.

How this formula work

For instance, in column B, there is a list of text strings which you want to check if containing all values in the range E3:E5, please use below formula.


Press Enter key, drag fill handle over the cells which you want to check. FALSE indicates the cell does not contain all values in the range E3:E5, while TURE indicates the relative cell contains all the values.
doc check if cell contain all of many things 2


SEARCH function: the SEARCH function will return the location of the first character of the text string inside another. If the SEARCH function finds the text, it returns the position, if not, it returns #VALUE! error. For instance, here the formula SEARCH($E$3:$E$5,B4) will search each value of the range E3:E5 in cell B4, and returns the location of each text string in the cell B4. It will return an array result as this: {1;7;12}
doc check if cell contain all of many things 3

ISNUMBER function: the ISNUMBER function will check whether a value is a number, and return TRUE o False. Here ISNUMBER(SEARCH($E$3:$E$5,B4)) will return array result as {true;true;true} as the SEARCH function finds 3 numbers.
doc check if cell contain all of many things 4

--ISNUMBER(SEARCH($E$3:$E$5,B4)) will convert the TRUE value to 1, and convert FALSE value to 0, so this formula changes the array result to {1;1;1}.
doc check if cell contain all of many things 5

SUMPRODUCT function: is used to multiples ranges or sum arrays together and returns the sum of products. The SUMPRODUCT(--ISNUMBER(SEARCH($E$3:$E$5,B4))) returns 1+1+1=3.

COUNTA function: returns the number of non-blank cells. COUNTA($E$3:$E$5) returns 3, so the result of SUMPRODUCT(--ISNUMBER(SEARCH($E$3:$E$5,B4))) is equal to 3, the whole formula will return TRUE, or return FALSE.
doc check if cell contain all of many things 6


The formula =SUMPRODUCT(--ISNUMBER(SEARCH(things,text)))=COUNTA(things) is not exactly checking. See screenshot:
doc check if cell contain all of many things 7

Sample File

doc sampleClick to download sample file

Relative Formulas

  • Count cells equal to
    With the COUNTIF function, you can count cells that equal to or not contain a specified value.
  • Count cells that equal to x or y
    In some times, you may want to count the number of cells that meet one of two criteria, in this case, you can use the COUNTIF function.
  • Count cells equal to x and y
    Here this article introduce the formula to count cells that at the meanwhile match two criteria.
  • Count cells not equal to
    This article talks about how to use the COUNTIF function to count the number of cell that not equal to a specific value

The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations