Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I tried to find a string in selected cells with the following code with no success: Sub Findstr() Dim myStr As String myStr = InputBox("Enter word to be searched") If myStr = "" Then Exit Sub With Selection.Characters(Start:=InStr(1, ActiveCell.Value, myStr), _ Length:=Len(myStr)).Font .FontStyle = "Bold" .ColorIndex = 3 End With End Sub Any advice on improving the code is much appreciated. TIA. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
line input problem-need to return 5 lines after a string is found | Excel Programming | |||
Search for a test string and if found insert 'x' in clumn 'A' | Excel Discussion (Misc queries) | |||
Search column - return row found in long text string | Excel Programming | |||
get linenumber when string found in VBE codemodule | Excel Programming | |||
Highlight found text string in cell? | Excel Programming |