View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] cathellisuk@yahoo.co.uk is offline
external usenet poster
 
Posts: 11
Default How replace a character in a string of characters?

Hi Chet,
try this revised version

Sub REMOVE_INVALID_DATA_PHX_DOWNLOAD()

MaxRow = ActiveSheet.Range("A65536").End(xlUp).Row

For rowy = 2 To MaxRow
Target = Left(Cells(rowy, 11), 1)
If Target = "=" Then
Cells(rowy, 11) = Mid(Cells(rowy, 11), 2)
End If
Next rowy

End Sub

I think your code was failing because you can only use the LEFT
function for reading a value not for writing.

Cath