How to Find Specific Text in a Text String

  • Thread starter Confused_in_Houston
  • Start date
C

Confused_in_Houston

I have a text string that I want to search for in a column. At times, it can
begin at character 1 in the text string. At others it might begin at
character 20, others at character 40. In other words it's random.

How can I get Excel to affirm that the text is there (or to copy that text
to an adjacent cell); regardless of the position of my sub-string within the
cell?

Thanks
 
G

Gary''s Student

Say we are searching for "happiness" in column A which contains stuff like:

happiness is a warm gun
health, wealth, and happiness

In B1 enter:

=COUNTIF(A1:A1,"*happiness*") and copy down

If a cell in column B is more than zero, you will find happiness to your left.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top