looping through cells

M

Matt Houston

Hi there,

I having a problem with the line of code that it commented, basically
want to take the text in the cell and and remove the first thre
characters, now how do I place the edited text back in the cell becaus
the way I have tried to do it is not working. Thanks

For Each cell In Selection
If Left(cell.Value, 3) <> "F/P" Or Len(Trim(cell.Value)) <
Then
cell.ClearContents
Else
' cell.FormulaR1C1 = Right(cell.Value, Len(cell.Value - 3))
End If
Next cel
 
F

Frank Kabel

Hi
try:
For Each cell In Selection
If Left(cell.Value, 3) <> "F/P" Or Len(Trim(cell.Value)) < 4
Then
cell.ClearContents
Else
cell.Value= Mid(cell.Value, 4,255)
End If
Next cell
 
Top