Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
=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. |
#3
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I compare data in two worksheets to find matching cells? | Excel Discussion (Misc queries) | |||
How can I combine multiple characters into a single character? | Excel Discussion (Misc queries) | |||
Find nth instance of a character in a string | Excel Discussion (Misc queries) | |||
Excel has a "Find Next" command but no "Find Previous" command. | Excel Discussion (Misc queries) | |||
VB Find and Replace | Excel Worksheet Functions |