Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default 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?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default 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?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default 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?



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 do I evaluate A1 from cell A2 and place a value into A3? RMar10 Excel Discussion (Misc queries) 5 February 18th 09 03:21 PM
evaluate cell value with sheet name [email protected] Excel Worksheet Functions 5 October 4th 07 09:41 PM
Display characters present after a specific character [email protected] Excel Discussion (Misc queries) 3 December 11th 06 03:08 AM
How do I evaluate a row of cells for a character in each cell? TwoDot Excel Worksheet Functions 2 September 22nd 06 12:53 PM
"There is no office assistant character file present on this syste Griz Excel Discussion (Misc queries) 1 December 5th 05 10:41 PM


All times are GMT +1. The time now is 07:16 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"