Find a text string in a column of text

sheffslayer

New Member
Joined
Oct 4, 2011
Messages
2
Hi All,

I'm new to excel so forgive me if I'm asking people to suck eggs. :confused: An easy one for you all im sure :-D

Problem
Got a column of excel cells containing lots of text. Ie. "Farmer Giles has a bail of straw" in cell B1. "Farmer Thompson has a tractor" in B2. "Farmer Wright has a bull" in B3 etc.... . I have a cell with the value of 'Giles' (or another value) in it. I want to report a simple 'Yes' or 'No' if 'Giles' (or cell value) is found. Not bothered about knowing where 'Giles' is in the cell or column or if its repeated.

Would like a simple formula if possible.

Thanks in advance to all, please help if you can to save my bacon!

..Phil
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Hi All,

I'm new to excel so forgive me if I'm asking people to suck eggs. :confused: An easy one for you all im sure :-D

Problem
Got a column of excel cells containing lots of text. Ie. "Farmer Giles has a bail of straw" in cell B1. "Farmer Thompson has a tractor" in B2. "Farmer Wright has a bull" in B3 etc.... . I have a cell with the value of 'Giles' (or another value) in it. I want to report a simple 'Yes' or 'No' if 'Giles' (or cell value) is found. Not bothered about knowing where 'Giles' is in the cell or column or if its repeated.

Would like a simple formula if possible.

Thanks in advance to all, please help if you can to save my bacon!

..Phil
Try this...

Data to search in column B.

D1 = Giles

=IF(COUNTIF(B:B,"*"&D1&"*"),"Yes","No")
 
Upvote 0
Assuming A1 houses the word of interest (Giles in your example) maybe

=IF(COUNTIF(B:B,"*"&A1&"*"),"Yes","No")

M.
 
Upvote 0
In the above example... what if you had all of those sentences in a paragraph... in the same cell, and only wanted to extract and isolate one of those sentences in a new cell. Could you create a formula for that?

Example of what is pasted in CELL B1: "Farmer Giles has a bail of straw";in cell B1. "Farmer Thompson has a tractor" in B2;"Farmer Wright has a bull; in B3 etc.... . I have a cell with the value of 'Giles' (or another value) in it.

Lets just say i wanted to find all the data from B2;" up until the;

How could I extract the phrase Farmer Wright has a bull

So... can i create a formula that will find data that is placed BETWEEN 2 sets of constant data? ie. I will always want any data that falls between B2;" AND ;

I hope this isn't too confusing.. lol
 
Upvote 0

Forum statistics

Threads
1,224,537
Messages
6,179,405
Members
452,911
Latest member
a_barila

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top