Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Searching for specific text
I need to loop down a range and stop when a cell contains the text "xyz
somewhere within a cell. Thank -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Searching for specific text
Hi
one way: try something like sub foo() dim rng as range dim cell as range set rng = activesheet.range("A1:A100") for each cell in rng if instr (cell.value,"xyz") then msgbox cell.address cell.select exit sub end if next end sub -- Regards Frank Kabel Frankfurt, Germany I need to loop down a range and stop when a cell contains the text "xyz" somewhere within a cell. Thanks --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Searching for specific text
try this
Sub findxyz() x = Range("d7:d12").Find("xyz", lookat:=xlPart).Address MsgBox x End Sub sub gotoxyz Range(Range("d7:d12").Find("xyz", lookat:=xlPart).Address).Select end sub -- Don Guillett SalesAid Software "simoncohen " wrote in message ... I need to loop down a range and stop when a cell contains the text "xyz" somewhere within a cell. Thanks --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Searching for specific text - how to | Excel Worksheet Functions | |||
Searching for case specific data | Excel Discussion (Misc queries) | |||
Searching two columns against a specific criteria | Excel Worksheet Functions | |||
Searching for the presence of specific words | Excel Worksheet Functions | |||
searching for specific text | Excel Discussion (Misc queries) |