Solved

Is there a LIKE function in Excel

Posted on 2015-01-13
7
70 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
[X]
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
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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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 48

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
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 a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

622 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