Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I need to check if there is a space in a string(Cell) and use the result as a test in an if statement.
I tried using search() but if there is no space there is no result so I get #VALUE in my formula cell. =IF(SEARCH(" ",G2),{split string at space},"FALSE") Is there anything I can use that will get me a Boolean true false result that can be used? |
#2
![]() |
|||
|
|||
![]()
I have found an answer.
If I enclose the search in an ISERR() then it works. ISERR(SEARCH(" ",G2)) result of this is either TRUE or FALSE. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Am Fri, 8 Mar 2013 14:41:53 +0000 schrieb Caveman1957: I need to check if there is a space in a string(Cell) and use the result as a test in an if statement. I tried using search() but if there is no space there is no result so I get #VALUE in my formula cell. =IF(SEARCH(" ",G2),{split string at space},"FALSE") Is there anything I can use that will get me a Boolean true false result that can be used? you can use TextToColumns with space as deliniter. If there is a space the string will be split. Or use formula: =IF(ISNUMBER(FIND(" ",G2)),{split string at space},"False") Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Test to see if cell contains a space? | Excel Worksheet Functions | |||
Test for string of space chars? | Excel Programming | |||
Number of space in a string | Excel Discussion (Misc queries) | |||
how to remove a space after a string? | Excel Programming | |||
Check Drive Space | Excel Programming |