ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   FIND a character (https://www.excelbanter.com/excel-discussion-misc-queries/10210-find-character.html)

Brian H

FIND a character
 
Hello All,

I want to find a character in an entry in Excel and assign a value in
another entry depending on if the character is found or not. For example, I
am trying to use
IF(FIND("m",F3)=#VALUE!,0,B3)
to give me a value 0 if the logical test in the IF function is TRUE.
Otherwise, return the value in B3. The problem is if "m" is not found, FIND
returns the #VALUE! error value, and I have no idea on how to test for this
condition. Any ideas? Does anyone have another suggestion on how to
accomplish what I am trying to do? Thank you.

Peo Sjoblom

=IF(ISNUMBER(FIND("m",F3)),0,B3)


Regards,

Peo Sjoblom

"Brian H" wrote:

Hello All,

I want to find a character in an entry in Excel and assign a value in
another entry depending on if the character is found or not. For example, I
am trying to use
IF(FIND("m",F3)=#VALUE!,0,B3)
to give me a value 0 if the logical test in the IF function is TRUE.
Otherwise, return the value in B3. The problem is if "m" is not found, FIND
returns the #VALUE! error value, and I have no idea on how to test for this
condition. Any ideas? Does anyone have another suggestion on how to
accomplish what I am trying to do? Thank you.


Bernard Liengme

Try ISERROR(FIND("m",F3)) as your condition
=IF(ISERROR(FIND("m",F3)) ,0,B3)
I assume the B3 is correct and not a typo for F3
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Brian H" <Brian wrote in message
...
Hello All,

I want to find a character in an entry in Excel and assign a value in
another entry depending on if the character is found or not. For example,
I
am trying to use
IF(FIND("m",F3)=#VALUE!,0,B3)
to give me a value 0 if the logical test in the IF function is TRUE.
Otherwise, return the value in B3. The problem is if "m" is not found,
FIND
returns the #VALUE! error value, and I have no idea on how to test for
this
condition. Any ideas? Does anyone have another suggestion on how to
accomplish what I am trying to do? Thank you.





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

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