Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Prohock
 
Posts: n/a
Default Formula that will test text conditions in a single cell

I need a function that will use a column of text values and test these values
to see if one or more of the values exist in a single cell. If it does I need
the function to return true or false.

Ie. cell A1 contains the text "Jim Smith" the B column contains the test
names (column of test values ) ie. B1 is "bill" B2 is "fred" B3 is "jim".
Because Jim is in the cell A1 I would need the function in C1 to return the
value "true". If A1 contained the text "bob smith" then function in C1 would
return the value "false".
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ardus Petus
 
Posts: n/a
Default Formula that will test text conditions in a single cell

In C1, enter:
=IF(SUMPRODUCT(--ISNUM(FIND(B1:B3;$A$1)))0;TRUE;FALSE)

See example: http://cjoint.com/?eblmKt6Cpa

HTH
--
AP

"Prohock" a écrit dans le message de
...
I need a function that will use a column of text values and test these

values
to see if one or more of the values exist in a single cell. If it does I

need
the function to return true or false.

Ie. cell A1 contains the text "Jim Smith" the B column contains the test
names (column of test values ) ie. B1 is "bill" B2 is "fred" B3 is "jim".
Because Jim is in the cell A1 I would need the function in C1 to return

the
value "true". If A1 contained the text "bob smith" then function in C1

would
return the value "false".



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Formula that will test text conditions in a single cell

There is a typo in the formula, and you might want to use SEARCH as the OP
specified Jim Smith and jim

=SUMPRODUCT(--ISNUMBER(SEARCH(B1:B3,$A$1)))0

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Ardus Petus" wrote in message
...
In C1, enter:
=IF(SUMPRODUCT(--ISNUM(FIND(B1:B3;$A$1)))0;TRUE;FALSE)

See example: http://cjoint.com/?eblmKt6Cpa

HTH
--
AP

"Prohock" a écrit dans le message de
...
I need a function that will use a column of text values and test these

values
to see if one or more of the values exist in a single cell. If it does I

need
the function to return true or false.

Ie. cell A1 contains the text "Jim Smith" the B column contains the test
names (column of test values ) ie. B1 is "bill" B2 is "fred" B3 is

"jim".
Because Jim is in the cell A1 I would need the function in C1 to return

the
value "true". If A1 contained the text "bob smith" then function in C1

would
return the value "false".





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Formula that will test text conditions in a single cell

=SUMPRODUCT(COUNTIF(A1,"*"&B1:B3&"*"))0

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Prohock" wrote in message
...
I need a function that will use a column of text values and test these

values
to see if one or more of the values exist in a single cell. If it does I

need
the function to return true or false.

Ie. cell A1 contains the text "Jim Smith" the B column contains the test
names (column of test values ) ie. B1 is "bill" B2 is "fred" B3 is "jim".
Because Jim is in the cell A1 I would need the function in C1 to return

the
value "true". If A1 contained the text "bob smith" then function in C1

would
return the value "false".



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Aladin Akyurek
 
Posts: n/a
Default Formula that will test text conditions in a single cell

=ISNUMBER(LOOKUP(9.99999999999999E+307,SEARCH($B$1 :$B$3,A1)))+0

A result of 1 means a hit, 0 no hit.

Prohock wrote:
I need a function that will use a column of text values and test these values
to see if one or more of the values exist in a single cell. If it does I need
the function to return true or false.

Ie. cell A1 contains the text "Jim Smith" the B column contains the test
names (column of test values ) ie. B1 is "bill" B2 is "fred" B3 is "jim".
Because Jim is in the cell A1 I would need the function in C1 to return the
value "true". If A1 contained the text "bob smith" then function in C1 would
return the value "false".



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Prohock
 
Posts: n/a
Default Formula that will test text conditions in a single cell

Thanks to everyone for their assistance, it works perfect! One more question,
How would you adapt the formula so that it test any value that is located in
Column B. Currently if I try to test the entire column I get false results
because of blank cells? Ie

"Aladin Akyurek" wrote:

=ISNUMBER(LOOKUP(9.99999999999999E+307,SEARCH($B$1 :$B$3,A1)))+0

A result of 1 means a hit, 0 no hit.

Prohock wrote:
I need a function that will use a column of text values and test these values
to see if one or more of the values exist in a single cell. If it does I need
the function to return true or false.

Ie. cell A1 contains the text "Jim Smith" the B column contains the test
names (column of test values ) ie. B1 is "bill" B2 is "fred" B3 is "jim".
Because Jim is in the cell A1 I would need the function in C1 to return the
value "true". If A1 contained the text "bob smith" then function in C1 would
return the value "false".


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Formula that will test text conditions in a single cell

The sumproduct variants will not work on a entire column, it must be a
specified range, but you can make them large.

=SUMPRODUCT(--(B1:B300<""),COUNTIF(A1,"*"&B1:B300&"*"))0

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Prohock" wrote in message
...
Thanks to everyone for their assistance, it works perfect! One more

question,
How would you adapt the formula so that it test any value that is located

in
Column B. Currently if I try to test the entire column I get false results
because of blank cells? Ie

"Aladin Akyurek" wrote:

=ISNUMBER(LOOKUP(9.99999999999999E+307,SEARCH($B$1 :$B$3,A1)))+0

A result of 1 means a hit, 0 no hit.

Prohock wrote:
I need a function that will use a column of text values and test these

values
to see if one or more of the values exist in a single cell. If it does

I need
the function to return true or false.

Ie. cell A1 contains the text "Jim Smith" the B column contains the

test
names (column of test values ) ie. B1 is "bill" B2 is "fred" B3 is

"jim".
Because Jim is in the cell A1 I would need the function in C1 to

return the
value "true". If A1 contained the text "bob smith" then function in C1

would
return the value "false".




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Prohock
 
Posts: n/a
Default Formula that will test text conditions in a single cell

Is there away to "Ingnore Blank Cells"?

"Bob Phillips" wrote:

The sumproduct variants will not work on a entire column, it must be a
specified range, but you can make them large.

=SUMPRODUCT(--(B1:B300<""),COUNTIF(A1,"*"&B1:B300&"*"))0

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Prohock" wrote in message
...
Thanks to everyone for their assistance, it works perfect! One more

question,
How would you adapt the formula so that it test any value that is located

in
Column B. Currently if I try to test the entire column I get false results
because of blank cells? Ie

"Aladin Akyurek" wrote:

=ISNUMBER(LOOKUP(9.99999999999999E+307,SEARCH($B$1 :$B$3,A1)))+0

A result of 1 means a hit, 0 no hit.

Prohock wrote:
I need a function that will use a column of text values and test these

values
to see if one or more of the values exist in a single cell. If it does

I need
the function to return true or false.

Ie. cell A1 contains the text "Jim Smith" the B column contains the

test
names (column of test values ) ie. B1 is "bill" B2 is "fred" B3 is

"jim".
Because Jim is in the cell A1 I would need the function in C1 to

return the
value "true". If A1 contained the text "bob smith" then function in C1

would
return the value "false".




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Aladin Akyurek
 
Posts: n/a
Default Formula that will test text conditions in a single cell

=ISNUMBER(LOOKUP(9.99999999999999E+307,SEARCH(IF(B 1:B20<"",B1:B20,-9.99999999999999E+307),A1)))+0

which needs to be confirmed with control+shift+enter, not just with enter.

Prohock wrote:
Thanks to everyone for their assistance, it works perfect! One more question,
How would you adapt the formula so that it test any value that is located in
Column B. Currently if I try to test the entire column I get false results
because of blank cells? Ie

"Aladin Akyurek" wrote:


=ISNUMBER(LOOKUP(9.99999999999999E+307,SEARCH($B $1:$B$3,A1)))+0

A result of 1 means a hit, 0 no hit.

Prohock wrote:

I need a function that will use a column of text values and test these values
to see if one or more of the values exist in a single cell. If it does I need
the function to return true or false.

Ie. cell A1 contains the text "Jim Smith" the B column contains the test
names (column of test values ) ie. B1 is "bill" B2 is "fred" B3 is "jim".
Because Jim is in the cell A1 I would need the function in C1 to return the
value "true". If A1 contained the text "bob smith" then function in C1 would
return the value "false".


  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Formula that will test text conditions in a single cell

That formula does.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Prohock" wrote in message
...
Is there away to "Ingnore Blank Cells"?

"Bob Phillips" wrote:

The sumproduct variants will not work on a entire column, it must be a
specified range, but you can make them large.

=SUMPRODUCT(--(B1:B300<""),COUNTIF(A1,"*"&B1:B300&"*"))0

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Prohock" wrote in message
...
Thanks to everyone for their assistance, it works perfect! One more

question,
How would you adapt the formula so that it test any value that is

located
in
Column B. Currently if I try to test the entire column I get false

results
because of blank cells? Ie

"Aladin Akyurek" wrote:

=ISNUMBER(LOOKUP(9.99999999999999E+307,SEARCH($B$1 :$B$3,A1)))+0

A result of 1 means a hit, 0 no hit.

Prohock wrote:
I need a function that will use a column of text values and test

these
values
to see if one or more of the values exist in a single cell. If it

does
I need
the function to return true or false.

Ie. cell A1 contains the text "Jim Smith" the B column contains

the
test
names (column of test values ) ie. B1 is "bill" B2 is "fred" B3 is

"jim".
Because Jim is in the cell A1 I would need the function in C1 to

return the
value "true". If A1 contained the text "bob smith" then function

in C1
would
return the value "false".








  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Prohock
 
Posts: n/a
Default Formula that will test text conditions in a single cell

Bob I really appreciate your help, everything works perfectly. Would you be
able to create a formula that does a similary thing in a MS access query
table?

"Bob Phillips" wrote:

That formula does.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Prohock" wrote in message
...
Is there away to "Ingnore Blank Cells"?

"Bob Phillips" wrote:

The sumproduct variants will not work on a entire column, it must be a
specified range, but you can make them large.

=SUMPRODUCT(--(B1:B300<""),COUNTIF(A1,"*"&B1:B300&"*"))0

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Prohock" wrote in message
...
Thanks to everyone for their assistance, it works perfect! One more
question,
How would you adapt the formula so that it test any value that is

located
in
Column B. Currently if I try to test the entire column I get false

results
because of blank cells? Ie

"Aladin Akyurek" wrote:

=ISNUMBER(LOOKUP(9.99999999999999E+307,SEARCH($B$1 :$B$3,A1)))+0

A result of 1 means a hit, 0 no hit.

Prohock wrote:
I need a function that will use a column of text values and test

these
values
to see if one or more of the values exist in a single cell. If it

does
I need
the function to return true or false.

Ie. cell A1 contains the text "Jim Smith" the B column contains

the
test
names (column of test values ) ie. B1 is "bill" B2 is "fred" B3 is
"jim".
Because Jim is in the cell A1 I would need the function in C1 to
return the
value "true". If A1 contained the text "bob smith" then function

in C1
would
return the value "false".







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF Function to test formula in a cell Fred Holmes Excel Worksheet Functions 5 November 18th 05 12:04 AM
Cell text based on 4 condition test Bob Wall Excel Worksheet Functions 3 November 16th 05 07:34 PM
Text in formula bar is not displaying in cell Raquel8D Excel Discussion (Misc queries) 1 August 29th 05 10:31 PM
Using the text from a cell as a range name in a formula Fletch Excel Discussion (Misc queries) 3 June 13th 05 07:57 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"