Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Is there a LIKE function in Excel

Posted on 2015-01-13
7
63 Views
Last Modified: 2015-02-11
I have three thousand rows. In one column there is a field that in some instances contains the word "mattress". I want to see how many instances there are.
0
Comment
Question by:CMChalcraft
7 Comments
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 40546752
Use COUNTIF.

For example:

=COUNTIF(A1:A100,"mattress") to see how many cells have ONLY the word "mattress" as their values

=COUNTIF(A1:A100,"*mattress*") to see how many cells have the word "mattress" within their values, as well as potentially some other text
0
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40546756
find or search can find a value inside a word, e.g.

=if(iserror(SEARCH("mattress",A1)),"No","Yes")

If you want to count multiple instances, then you can use the array formula

=SUM(IF(ISERROR(SEARCH("mattress",A:A)),0,1))

and press Ctrl+Shift+Enter instead of pressing Enter (change A:A to your range).

Alternatively, do a filter on that column, and the number of instances will be in the status bar at the bottom.
0
 

Author Comment

by:CMChalcraft
ID: 40546779
Thank you. I have used =if(iserror(SEARCH("mattress",A1)),"No","Yes").

This is a spreadsheet a colleague has created and he wants to enter 1 or 0 for each matched instance. I have amended the formula to do this.

Very prompt!

Regards

Chris
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 40546793
COUNTIF does the exact same thing, without having to resort to an array formula.  Did you even try it?
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40552573
^ Best solution (COUNTIF).  No helper column needed; inserts the total in one cell; ultimately faster than having several thousand individual formulas returning 1 or 0.
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 40602754
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question