ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Search text (https://www.excelbanter.com/excel-discussion-misc-queries/28412-search-text.html)

lashio

Search text
 
A1 = "A24D"
I want to look up cell A1 for A2?D, similar to search text.
Cell B1 = 1 if A1 contains text A2?D, "" otherwise.
Can it be formulated? Thanks



Bob Phillips

=IF(AND(ISNUMBER(FIND("A2",A1)),ISNUMBER(FIND("D", A1))),IF(FIND("D",A1)=FIND
("A2",A1)+3,1,""),"")

--
HTH

Bob Phillips

"lashio" wrote in message
...
A1 = "A24D"
I want to look up cell A1 for A2?D, similar to search text.
Cell B1 = 1 if A1 contains text A2?D, "" otherwise.
Can it be formulated? Thanks





Dave Peterson

One mo

=IF(COUNTIF(A1,"a2?d")0,1,"")

The question mark in this formula is a wildcard for a single character.

lashio wrote:

A1 = "A24D"
I want to look up cell A1 for A2?D, similar to search text.
Cell B1 = 1 if A1 contains text A2?D, "" otherwise.
Can it be formulated? Thanks


--

Dave Peterson

lashio

Thank you, Bob

"Bob Phillips" wrote in message
...
=IF(AND(ISNUMBER(FIND("A2",A1)),ISNUMBER(FIND("D", A1))),IF(FIND("D",A1)=FIND
("A2",A1)+3,1,""),"")

--
HTH

Bob Phillips

"lashio" wrote in message
...
A1 = "A24D"
I want to look up cell A1 for A2?D, similar to search text.
Cell B1 = 1 if A1 contains text A2?D, "" otherwise.
Can it be formulated? Thanks







lashio

Thank you, Dave
So helpful!

"Dave Peterson" wrote in message
...
One mo

=IF(COUNTIF(A1,"a2?d")0,1,"")

The question mark in this formula is a wildcard for a single character.

lashio wrote:

A1 = "A24D"
I want to look up cell A1 for A2?D, similar to search text.
Cell B1 = 1 if A1 contains text A2?D, "" otherwise.
Can it be formulated? Thanks


--

Dave Peterson





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

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