Home |
Search |
Today's Posts |
#1
|
|||
|
|||
If CONTAINS
Hi all!!!
Im trying to figure how in a "IF formula" you do the following, Also i would like to have it for VB. Thanx IF(A1 CONTAINS (beetween other words) jump,TRUE,FALSE say A1 contains text like this "i like to jump to the roof" or "to the roof i lilke to jump" not in a particular position, return cell B1 to say "NO" Thank you all. |
#2
|
|||
|
|||
The syntax is
=IF(SEARCH("jump",A1,1)0,TRUE,FALSE) In VBA the code is If InStr(1, Range("a1").Value, "jump") 0 Then |
#3
|
|||
|
|||
On Wed, 10 Aug 2005 10:46:08 -0700, Kel wrote:
Hi all!!! Im trying to figure how in a "IF formula" you do the following, Also i would like to have it for VB. Thanx IF(A1 CONTAINS (beetween other words) jump,TRUE,FALSE say A1 contains text like this "i like to jump to the roof" or "to the roof i lilke to jump" not in a particular position, return cell B1 to say "NO" Thank you all. In Excel, you would use the FIND or SEARCH worksheet functions and, if the #Value! error is returned, then the search string was not found. In VBA you would use the InStr Function --ron |
#4
|
|||
|
|||
=if(isnumber(search("jump",a1)),true,false)
or even: =isnumber(search("jump",a1)) Kel wrote: Hi all!!! Im trying to figure how in a "IF formula" you do the following, Also i would like to have it for VB. Thanx IF(A1 CONTAINS (beetween other words) jump,TRUE,FALSE say A1 contains text like this "i like to jump to the roof" or "to the roof i lilke to jump" not in a particular position, return cell B1 to say "NO" Thank you all. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|