Link to home
Start Free TrialLog in
Avatar of CMChalcraft
CMChalcraftFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Is there a LIKE function in Excel

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.
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

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
ASKER CERTIFIED SOLUTION
Avatar of Phillip Burton
Phillip Burton

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CMChalcraft

ASKER

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
COUNTIF does the exact same thing, without having to resort to an array formula.  Did you even try it?
^ 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.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.