Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I want to search a text/number string to see if it has a dash "-" and if it
does, I want to insert a value and if it doesn't, I want a different value I tried... IF(SEARCH("-",A2)0 ....which works fine if the string does have a dash, but bombs to #VALUE! errror if the string does not have a dash Any help appreciated! |
#2
![]() |
|||
|
|||
![]()
=IF(ISNUMBER(SEARCH("-",A1)),"value_1","value_2")
HTH Jason Atlanta, GA -----Original Message----- I want to search a text/number string to see if it has a dash "-" and if it does, I want to insert a value and if it doesn't, I want a different value I tried... IF(SEARCH("-",A2)0 ....which works fine if the string does have a dash, but bombs to #VALUE! errror if the string does not have a dash Any help appreciated! . |
#3
![]() |
|||
|
|||
![]()
"Jason Morin" wrote...
=IF(ISNUMBER(SEARCH("-",A1)),"value_1","value_2") Alternatives. =IF(COUNTIF(A1,"*-*"),"Yay!","Boo!") =IF(SUBSTITUTE(A1,"-","")<A1,"Yay!","Boo!") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Print the results of a search | Excel Discussion (Misc queries) | |||
Q: search in string | Excel Discussion (Misc queries) | |||
Excel 2000 - How to create an auto search | Excel Discussion (Misc queries) | |||
Search for a Sheet | Excel Discussion (Misc queries) | |||
better search: "make worksheet visible" | Excel Discussion (Misc queries) |