Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Gracie Hughes   on Mar 04 In MS Office Category.

  
Question Answered By: Deloris Harris   on Mar 04

You could try something like:

Sub FindCity()
LookFor = "Redwood City"
Set OuputRange = Range("E1")
r = 0
For Each c In Range("A1:A100")
a = InStr(c, LookFor)
If a > 0 Then
OuputRange.Offset(r, 0) = c
r = r + 1
End If
Next
End Sub

Share: 

 

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

 
Didn't find what you were looking for? Find more on Excel VBA - need to copy paste conditional statement Or get search suggestion and latest updates.


Tagged: