I need a simple Find and Replace VBA code for excel. Dealing with a lot of text in Column H but need to search and replace a few words
[vba]
Sub FindReplace()
Dim a As Long
For Each a In ActiveSheet.UsedRange
a = Replace(a, "Find", "Replace")
Next
End Sub
[/vba]
Found that code on google simple and works by searching all cells in all columns
but i need it to only search column H
so i tryed
[vba]
Sub FindReplace()
Dim a As Long
For Each a In ActiveSheet.Range("H:H")
a = Replace(a, "Find", "Replace")
Next
End Sub
[/vba]
but seems to make now an endless loop ?
PLZ any help ?? sorry not very clued up on vba and been trying to sort this for a few days ..... just recording a macro of search and replace all falls over due to the amount of text in the cell (get a Formula to long Error)
the top code works but causes problems by searching all cells in all columns
Using Excel 2003