Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Oscar Montgomery   on Oct 20 In MS Office Category.

  
Question Answered By: Arthur Cole   on Oct 20

I have written  a small program to your problem have a look at my code
below

Sub om()
Dim a As String
Dim temp As String

a = Range("a1")
strlen1 = Len(a)
i = 1
While (strlen1 <> 0)
temp = Mid(a, i, 3)
If (temp = "FOX") Then
gotit = "Yes"
pos = i
End If
i = i + 1
strlen1 = strlen1 - 1
Wend
If (gotit = "Yes") Then
MsgBox ("Fox does exist at " & pos & " character to " & pos + 3)
Else
MsgBox ("Fox does not exist")
End If
End Sub

I hope this will be useful to you.

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Find Word from long statement Or get search suggestion and latest updates.


Tagged: