ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Find text within cell (https://www.excelbanter.com/excel-discussion-misc-queries/206743-find-text-within-cell.html)

Paula

Find text within cell
 
Hi,

I have a column where the cell contains vaiable information, and I want to
find any cell which contains LHR and SEA and LHR again, the format of the
text will be variable in length and separators and will not always contain
these 3 codes, a couple of examples of what the string will look like are
below:

AMS/DXB-AMS/LHR-SEA-LHR/AMS
DUB-/AMS/LHR-SEA-LHR-AMS-DUB

any ideas of formulas that will find a cell which contains sea and lhr
within it?

Rgds Paula


Mike H

Find text within cell
 
Paula,

Try this. Drag down as required.

=IF(SEARCH("LHR-SEA-LHR",A1),"It's Here", "Not Here")

Mike

"Paula" wrote:

Hi,

I have a column where the cell contains vaiable information, and I want to
find any cell which contains LHR and SEA and LHR again, the format of the
text will be variable in length and separators and will not always contain
these 3 codes, a couple of examples of what the string will look like are
below:

AMS/DXB-AMS/LHR-SEA-LHR/AMS
DUB-/AMS/LHR-SEA-LHR-AMS-DUB

any ideas of formulas that will find a cell which contains sea and lhr
within it?

Rgds Paula


Paula

Find text within cell
 
Thanks Mike, I'll try it, thanks for coming to the rescue again... don't know
what I would do without this group, but I do know my formulas are getting a
bit better as I learn. Thanks and have a nice weekend.

"Mike H" wrote:

Paula,

Try this. Drag down as required.

=IF(SEARCH("LHR-SEA-LHR",A1),"It's Here", "Not Here")

Mike

"Paula" wrote:

Hi,

I have a column where the cell contains vaiable information, and I want to
find any cell which contains LHR and SEA and LHR again, the format of the
text will be variable in length and separators and will not always contain
these 3 codes, a couple of examples of what the string will look like are
below:

AMS/DXB-AMS/LHR-SEA-LHR/AMS
DUB-/AMS/LHR-SEA-LHR-AMS-DUB

any ideas of formulas that will find a cell which contains sea and lhr
within it?

Rgds Paula


nastech

Find text within cell
 
hi, I have found the following works good for being abe to modify from one
location.
it would used defined names (e.g.: Ab, by: Insert, Name, Define): enter:
={3;6;9;"c";"C"} or ={"LHR-SEA-LHR";"DXB-AMS"} name it anything/ Ab

for:
=IF(SUMPRODUCT(--ISNUMBER(FIND(Ab,F9)))0,"yes","no")

"Paula" wrote:

Hi,

I have a column where the cell contains vaiable information, and I want to
find any cell which contains LHR and SEA and LHR again, the format of the
text will be variable in length and separators and will not always contain
these 3 codes, a couple of examples of what the string will look like are
below:

AMS/DXB-AMS/LHR-SEA-LHR/AMS
DUB-/AMS/LHR-SEA-LHR-AMS-DUB

any ideas of formulas that will find a cell which contains sea and lhr
within it?

Rgds Paula



All times are GMT +1. The time now is 01:24 PM.

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