Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I need to set the word "testing" and "result" in all my cells on particular page to underlined. Normally I would do this manually however, as there are so many items (over 2000 rows) I was hoping could write a macro to solve this. Here is what I've come up with;however, I get an error on the firs line (excel 2003) Sub UnderlineWord() Selection.Find.Replacement.ClearFormatting Selection.Find.Replacement.Font.Underline = True With Selection.Find .Text = "testing" .Replacement.Text = "testing" End With Selection.Find.Execute Replace:=wdReplaceAll End Sub I've tried doing a replace funtion using formatting; however, Exce changes the entire contents of the cell to underlined when it change one word. The cell has multiple rows in it with ALT-Returns and need to only underline the words "testing" and "result" I think the code is close but I'm missing something. Thanks in advance to anyone that can help : -- TheYellowDar ----------------------------------------------------------------------- TheYellowDart's Profile: http://www.excelforum.com/member.php...fo&userid=2654 View this thread: http://www.excelforum.com/showthread.php?threadid=39816 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I find the series selection tab? | Charts and Charting in Excel | |||
Find Option replacement | Excel Discussion (Misc queries) | |||
Find selection | Excel Programming | |||
Use of Selection.Find & ActiveCell | Excel Programming | |||
Find the row of all cells in a selection | Excel Programming |