![]() |
How do I evaluate whether a character is present in a cell?
I am hoping I can evaluate whether a specific character is present in the
text of a cell using an If function. For example if I test for a forward-slash in a cell containing the text abc/def I want a TRUE result but in a cell containing the text abcdef I want a FALSE result. Is this possible? |
How do I evaluate whether a character is present in a cell?
Actually, you don't even need to use IF:
=LEN(A1)LEN(SUBSTITUTE(A1,"/","")) will return TRUE if A1 contains / or FALSE if it doesn't. Hope this helps, Hutch "Crash" wrote: I am hoping I can evaluate whether a specific character is present in the text of a cell using an If function. For example if I test for a forward-slash in a cell containing the text abc/def I want a TRUE result but in a cell containing the text abcdef I want a FALSE result. Is this possible? |
How do I evaluate whether a character is present in a cell?
On Sat, 28 Nov 2009 20:05:01 -0800, Crash
wrote: I am hoping I can evaluate whether a specific character is present in the text of a cell using an If function. For example if I test for a forward-slash in a cell containing the text abc/def I want a TRUE result but in a cell containing the text abcdef I want a FALSE result. Is this possible? =ISNUMBER(SEARCH("/",A1)) =ISNUMBER(FIND("/",A1)) If you are looking for a letter, SEARCH is case-insensitive; FIND is case-sensitive. Also look up HELP for wildcards in case you need to find one of them. --ron |
How do I evaluate whether a character is present in a cell?
Use FIND() or SEARCH().
=ISNUMBER(FIND("/",A1)) =IF(ISNUMBER(FIND("/",A1)),"true statement","false statement") If this post helps click Yes --------------- Jacob Skaria "Crash" wrote: I am hoping I can evaluate whether a specific character is present in the text of a cell using an If function. For example if I test for a forward-slash in a cell containing the text abc/def I want a TRUE result but in a cell containing the text abcdef I want a FALSE result. Is this possible? |
How do I evaluate whether a character is present in a cell?
Another one...
=COUNTIF(A1,"*/*")0 -- Biff Microsoft Excel MVP "Crash" wrote in message ... I am hoping I can evaluate whether a specific character is present in the text of a cell using an If function. For example if I test for a forward-slash in a cell containing the text abc/def I want a TRUE result but in a cell containing the text abcdef I want a FALSE result. Is this possible? |
All times are GMT +1. The time now is 06:07 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com