LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Find a specific string in a cell


Sub sWords()
Range("E1").Select

Do While Len(ActiveCell.Value) < 0
str1 = InStr(1, ActiveCell.Value, "New")
str2 = InStr(1, ActiveCell.Value, "Account")
If str1 = 1 Or str2 = 1 Then
ActiveCell.Offset(1, 0).Select
Else
Selection.Delete Shift:=xlUp
End If
Loop

End Sub

That should do it.

Cheers
Jo

--
LFCFa
-----------------------------------------------------------------------
LFCFan's Profile: http://www.excelforum.com/member.php...fo&userid=3748
View this thread: http://www.excelforum.com/showthread.php?threadid=57418

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find specific info within a text string using VBA laavista Excel Discussion (Misc queries) 2 May 20th 09 06:37 PM
Find a specific formatted string in a cell KCK Excel Worksheet Functions 1 April 16th 08 09:16 PM
Find specific value in a string Lost in Microbiology Excel Discussion (Misc queries) 8 May 16th 07 09:58 AM
Find specific text in a string Samuel[_5_] Excel Programming 4 February 22nd 05 10:27 PM
Find specific text in a string Kilcup Excel Programming 5 June 10th 04 04:29 PM


All times are GMT +1. The time now is 03:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"