flicky_longcartridge
New Member
- Joined
- Nov 19, 2008
- Messages
- 29
Hi Guys,
I am trying to execute a simple find and replace statement...
It needs to loops through all the cells in column H of the sheet called HIST. If it finds the value #N/A then it needs to replace it with the value 0.00
I have tried...
Sub findrep()
Dim target, cell As Range
Dim i, k As String
i = "#N/A"
k = "0.00"
Set target = Sheets("HIST").Range(Range("D1"), Range("D65536").End(xlUp))
For Each cell In target
If cell.Value = i Then cell.Value = k
Next cell
End Sub
But with no success...
Help experts please!!!!
I am trying to execute a simple find and replace statement...
It needs to loops through all the cells in column H of the sheet called HIST. If it finds the value #N/A then it needs to replace it with the value 0.00
I have tried...
Sub findrep()
Dim target, cell As Range
Dim i, k As String
i = "#N/A"
k = "0.00"
Set target = Sheets("HIST").Range(Range("D1"), Range("D65536").End(xlUp))
For Each cell In target
If cell.Value = i Then cell.Value = k
Next cell
End Sub
But with no success...
Help experts please!!!!