Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, please try this . . .
Sub FindText() With ActiveSheet.Range("A1:D10") Set c = .Find("UserID", LookIn:=xlValues) If Not c Is Nothing Then firstAddress = c.Address Do c.Interior.ColorIndex = 6 Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address < FirstAddress End If End With End Sub Regards, John Mansfield www.pdbook.com -----Original Message----- I have a macro that performs a loop through a column of text, until the ActiveCell equals a certain value. Below is the relevant section of code. How can I test for any cell that has UserID anywhere in it, such that it would find text like NWUserId or UserID2? Do Until ActiveCell = "UserID" i = i + 1 ActiveCell.Offset(1, 0).Range("A1").Select Loop Thank You -- ackurv ---------------------------------------------------------- -------------- ackurv's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=15526 View this thread: http://www.excelforum.com/showthread...hreadid=270939 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
search for text "beginning with" "containing" wildcards | Excel Worksheet Functions | |||
how do I use wildcards to search between a range of product numb. | Setting up and Configuration of Excel | |||
How do I search without wildcards? | Excel Discussion (Misc queries) | |||
using wildcards on text | Excel Worksheet Functions | |||
Using wildcards within a text box | Excel Programming |