ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL (https://www.excelbanter.com/excel-discussion-misc-queries/163993-find-text-1-cell-compare-another-cell.html)

nastech

FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL
 
(071029) FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL

Hi, trying to compare text, e.g.:

$B$2: A0 B0 C0 D0 E0 F0
B9: F00

trying to see if the left 2 characters in B9 exist in B2, but when use just
"F" in B9, get a false positive/TRUE result, using:

=ISNUMBER(SEARCH(LEFT(B9,2),$B$2))

thanks.


Pete_UK

FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL
 
You could check for B9 being two characters first:

=IF(LEN(B9)<2,"too few chars",ISNUMBER(SEARCH(LEFT(B9,2),$B$2)))

Hope this helps.

Pete

On Oct 29, 11:51 pm, nastech
wrote:
(071029) FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL

Hi, trying to compare text, e.g.:

$B$2: A0 B0 C0 D0 E0 F0
B9: F00

trying to see if the left 2 characters in B9 exist in B2, but when use just
"F" in B9, get a false positive/TRUE result, using:

=ISNUMBER(SEARCH(LEFT(B9,2),$B$2))

thanks.




Gary''s Student

FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL
 
The TRUE result is not False. With just an F in B9, the LEFT returns the F
and the SEARCH can surely find it.
--
Gary''s Student - gsnu2007


"nastech" wrote:

(071029) FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL

Hi, trying to compare text, e.g.:

$B$2: A0 B0 C0 D0 E0 F0
B9: F00

trying to see if the left 2 characters in B9 exist in B2, but when use just
"F" in B9, get a false positive/TRUE result, using:

=ISNUMBER(SEARCH(LEFT(B9,2),$B$2))

thanks.


nastech

FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL
 
OR(is false because it is not the consequence I am looking for..

"Gary''s Student" wrote:

The TRUE result is not False. With just an F in B9, the LEFT returns the F
and the SEARCH can surely find it.
--
Gary''s Student - gsnu2007


"nastech" wrote:

(071029) FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL

Hi, trying to compare text, e.g.:

$B$2: A0 B0 C0 D0 E0 F0
B9: F00

trying to see if the left 2 characters in B9 exist in B2, but when use just
"F" in B9, get a false positive/TRUE result, using:

=ISNUMBER(SEARCH(LEFT(B9,2),$B$2))

thanks.


nastech

FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL
 
thanks, that should do it.

would recommend combination of commands in 2 or 3 letter abbreviations,
mnemonics.. e.g.: (isnumber(search could be: IS(LEFT(B9,2),$B$2)
but would allow inclusive / exclusive properties programmed in such as:
=IF(LEN(B9)<2,FALSE,ISNUMBER(SEARCH(LEFT(B9,2),$B$ 2)))

resources being what they are.


"Pete_UK" wrote:

You could check for B9 being two characters first:

=IF(LEN(B9)<2,"too few chars",ISNUMBER(SEARCH(LEFT(B9,2),$B$2)))

Hope this helps.

Pete

On Oct 29, 11:51 pm, nastech
wrote:
(071029) FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL

Hi, trying to compare text, e.g.:

$B$2: A0 B0 C0 D0 E0 F0
B9: F00

trying to see if the left 2 characters in B9 exist in B2, but when use just
"F" in B9, get a false positive/TRUE result, using:

=ISNUMBER(SEARCH(LEFT(B9,2),$B$2))

thanks.





nastech

FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL
 
thinking that zero "0" will return an "unquote" false positive. will check,
but seems like a tuff fix. thanks.

"Pete_UK" wrote:

You could check for B9 being two characters first:

=IF(LEN(B9)<2,"too few chars",ISNUMBER(SEARCH(LEFT(B9,2),$B$2)))

Hope this helps.

Pete

On Oct 29, 11:51 pm, nastech
wrote:
(071029) FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL

Hi, trying to compare text, e.g.:

$B$2: A0 B0 C0 D0 E0 F0
B9: F00

trying to see if the left 2 characters in B9 exist in B2, but when use just
"F" in B9, get a false positive/TRUE result, using:

=ISNUMBER(SEARCH(LEFT(B9,2),$B$2))

thanks.





Roger Govier[_3_]

FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL
 
Hi

Try
=ISNUMBER(FIND(LEFT(B9,2)&" ",$B$2&" "))

--
Regards
Roger Govier



"nastech" wrote in message
...
OR(is false because it is not the consequence I am looking for..

"Gary''s Student" wrote:

The TRUE result is not False. With just an F in B9, the LEFT returns the
F
and the SEARCH can surely find it.
--
Gary''s Student - gsnu2007


"nastech" wrote:

(071029) FIND TEXT IN 1 CELL, COMPARE TO ANOTHER CELL

Hi, trying to compare text, e.g.:

$B$2: A0 B0 C0 D0 E0 F0
B9: F00

trying to see if the left 2 characters in B9 exist in B2, but when use
just
"F" in B9, get a false positive/TRUE result, using:

=ISNUMBER(SEARCH(LEFT(B9,2),$B$2))

thanks.





All times are GMT +1. The time now is 02:48 AM.

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