ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to Find Specific Text in a Text String (https://www.excelbanter.com/excel-discussion-misc-queries/217942-how-find-specific-text-text-string.html)

Confused_in_Houston[_2_]

How to Find Specific Text in a Text String
 
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

muddan madhu

How to Find Specific Text in a Text String
 
try this

=MATCH("*"&B1&"*",A1:A10,0)



On Jan 27, 1:02*am, Confused_in_Houston
wrote:
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



Gary''s Student

How to Find Specific Text in a Text String
 
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.

--
Gary''s Student - gsnu200829


"Confused_in_Houston" wrote:

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



All times are GMT +1. The time now is 11:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com