How do I search "LAUNCH" between the selected cell's row and the next occurence of the cell with "APPL"?
How do I search "LAUNCH" between the selected cell's row and the next occurence of the cell with "APPL"?
Search in any column? Will LAUNCH and APPL be in the same column?
Thanks,
Solus
Please remember the following:
1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.Highlight the code in your post and press the # button in the toolbar.2. Show appreciation to those who have helped you by clicking below their posts.
3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.
"Slow is smooth, smooth is fast."
I am going to take what the OP said very literally.
Sub miscFind() Dim ws As Worksheet: Set ws = Sheets("Sheet1") Dim applFind As Range, launchFind As Range Set applFind = ws.Range(Selection, ws.UsedRange.SpecialCells(xlCellTypeLastCell)).Find(What:="APPL", LookIn:=xlValues, Lookat:=xlWhole) If Not applFind Is Nothing Then Set launchFind = ws.Range(Selection, applFind).Find(What:="LAUNCH", LookIn:=xlValues, Lookat:=xlWhole) If Not launchFind Is Nothing Then MsgBox ("LAUNCH was found in cell " & launchFind.Address) Else MsgBox ("LAUNCH was not found") End If Else MsgBox ("APPL was not found") End If End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks