VBA Search And Replace
Posted by John on January 21, 2002 10:32 PM
Being new to VBA Im trying to perform a search on a number of cells contained in the C column.
I have a VBA script, which will search for blank cells in column C and copy data from adjacent cells in the current row.
But is there a way of searching for a single character in my case an * within the range of cell data in column C to perform the same copy function.
Heres my current VBA script.
LastRow = Range("A65536").End(xlUp).Row
For i = 1 To LastRow
If Range("C" & i).Value = "" Then Range("D" & i & ":E" & i).Copy Destination:=Range("C" & i)
Next i