Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Micayla Bergen
 
Posts: n/a
Default find formula and return value

Hi i am using the following formula to find text in a cell
=IF(ISNUMBER(FIND("Super",B96)),"OK", "Not OK") and return a value. i have
adapted the formula for another spreadsheet and simply added more values to
check, i.e. =IF(ISNUMBER(FIND("Super""Account""Business:,B96)) ,"OK", "Not
OK") but it doesnt seem to work. where i can see the value in the cell it is
not returning ok instead of not ok. is there a limit to the number of values
i can search and if so why doesnt it say as an error? what am i missing?
Thanks very much
  #2   Report Post  
Rowan
 
Posts: n/a
Default

The find fuction will only let you search for a single string so you will
need to adapt your formula to something like:

=IF(OR(ISNUMBER(FIND("Super",B96)),ISNUMBER(FIND(" Account",B96)),ISNUMBER(FIND("Business",B96))),"OK ","Not OK")

(watch out for the line wrap)

Hope this helps
Rowan

"Micayla Bergen" wrote:

Hi i am using the following formula to find text in a cell
=IF(ISNUMBER(FIND("Super",B96)),"OK", "Not OK") and return a value. i have
adapted the formula for another spreadsheet and simply added more values to
check, i.e. =IF(ISNUMBER(FIND("Super""Account""Business:,B96)) ,"OK", "Not
OK") but it doesnt seem to work. where i can see the value in the cell it is
not returning ok instead of not ok. is there a limit to the number of values
i can search and if so why doesnt it say as an error? what am i missing?
Thanks very much

  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Try

=IF(OR(ISNUMBER(FIND({"Super","Account","Business" },B96))),"OK", "Not OK")

--
Regards,

Peo Sjoblom


"Micayla Bergen" wrote in message
...
Hi i am using the following formula to find text in a cell
=IF(ISNUMBER(FIND("Super",B96)),"OK", "Not OK") and return a value. i have
adapted the formula for another spreadsheet and simply added more values
to
check, i.e. =IF(ISNUMBER(FIND("Super""Account""Business:,B96)) ,"OK", "Not
OK") but it doesnt seem to work. where i can see the value in the cell it
is
not returning ok instead of not ok. is there a limit to the number of
values
i can search and if so why doesnt it say as an error? what am i missing?
Thanks very much


  #4   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Make a list of the words you want to find:

A1 = Super
A2 = Account
A3 = Business

=IF(SUMPRODUCT(--(ISNUMBER(FIND(A1:A3,B96)))),"Ok","Not Ok")

Tips:

FIND is case sensitive, SEARCH is not:

=IF(SUMPRODUCT(--(ISNUMBER(SEARCH(A1:A3,B96)))),"Ok","Not Ok")

Both FIND and SEACH will fail in situations when these types of values are
being tested:

Super = Superstitious = Superbowl

Account = Accountant

You can make the formula a little more robust by looking for the words with
a space on either side:

=IF(SUMPRODUCT(--(ISNUMBER(SEARCH(" "&A1:A3&" "," "&B96&" ")))),"Ok","Not
Ok")

This will help reduce false positives in that:

Super < Superstitious < Superbowl

Even using the above formula, it's still not 100% foolproof.

Biff

"Micayla Bergen" wrote in message
...
Hi i am using the following formula to find text in a cell
=IF(ISNUMBER(FIND("Super",B96)),"OK", "Not OK") and return a value. i have
adapted the formula for another spreadsheet and simply added more values
to
check, i.e. =IF(ISNUMBER(FIND("Super""Account""Business:,B96)) ,"OK", "Not
OK") but it doesnt seem to work. where i can see the value in the cell it
is
not returning ok instead of not ok. is there a limit to the number of
values
i can search and if so why doesnt it say as an error? what am i missing?
Thanks very much



  #5   Report Post  
Micayla Bergen
 
Posts: n/a
Default

Thanks very much, it worked like a dream - albeit a convoluted and
long-winded one!

"Rowan" wrote:

The find fuction will only let you search for a single string so you will
need to adapt your formula to something like:

=IF(OR(ISNUMBER(FIND("Super",B96)),ISNUMBER(FIND(" Account",B96)),ISNUMBER(FIND("Business",B96))),"OK ","Not OK")

(watch out for the line wrap)

Hope this helps
Rowan

"Micayla Bergen" wrote:

Hi i am using the following formula to find text in a cell
=IF(ISNUMBER(FIND("Super",B96)),"OK", "Not OK") and return a value. i have
adapted the formula for another spreadsheet and simply added more values to
check, i.e. =IF(ISNUMBER(FIND("Super""Account""Business:,B96)) ,"OK", "Not
OK") but it doesnt seem to work. where i can see the value in the cell it is
not returning ok instead of not ok. is there a limit to the number of values
i can search and if so why doesnt it say as an error? what am i missing?
Thanks very much



  #6   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Sp why didn't you try my formula?

--
Regards,

Peo Sjoblom


"Micayla Bergen" wrote in message
...
Thanks very much, it worked like a dream - albeit a convoluted and
long-winded one!

"Rowan" wrote:

The find fuction will only let you search for a single string so you will
need to adapt your formula to something like:

=IF(OR(ISNUMBER(FIND("Super",B96)),ISNUMBER(FIND(" Account",B96)),ISNUMBER(FIND("Business",B96))),"OK ","Not
OK")

(watch out for the line wrap)

Hope this helps
Rowan

"Micayla Bergen" wrote:

Hi i am using the following formula to find text in a cell
=IF(ISNUMBER(FIND("Super",B96)),"OK", "Not OK") and return a value. i
have
adapted the formula for another spreadsheet and simply added more
values to
check, i.e. =IF(ISNUMBER(FIND("Super""Account""Business:,B96)) ,"OK",
"Not
OK") but it doesnt seem to work. where i can see the value in the cell
it is
not returning ok instead of not ok. is there a limit to the number of
values
i can search and if so why doesnt it say as an error? what am i
missing?
Thanks very much


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
How to insert carriage return in the middle of a text formula to . Dave Excel Discussion (Misc queries) 2 March 17th 05 02:14 PM
Formula to return ADDRESS of cell in range that meets criteria Christie Excel Worksheet Functions 1 March 4th 05 11:13 PM
Date formula...help with return on formula Juco Excel Worksheet Functions 2 January 28th 05 09:28 PM
Formula to return cell contents based on multiple conditions Bill Excel Worksheet Functions 3 January 19th 05 09:59 AM
Excel - Formula Query: Search for and Return Value Sue Excel Worksheet Functions 3 December 7th 04 12:35 AM


All times are GMT +1. The time now is 10:45 AM.

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

About Us

"It's about Microsoft Excel"