H
Harlan Grove
Bob Phillips wrote...
....
Could simplify: Right(x, Len(x) - y) == Mid(x, y + 1)
Then again, the whole If block could be replaced by
Cells(i, "A").Value = _
Application.WorksheetFunction.Replace(Cells(i, "A").Value, nIndex,
1, "")
....
....If nIndex = 1 Then
Cells(i, "A").Value = Right(Cells(i, "A").Value, _
Len(Cells(i, "A").Value) - 1)
Else
Cells(i, "A").Value = Left(Cells(i, "A").Value, nIndex - 1) & _
Right(Cells(i, "A").Value, Len(Cells(i, "A").Value) - nIndex)
End If
Could simplify: Right(x, Len(x) - y) == Mid(x, y + 1)
Then again, the whole If block could be replaced by
Cells(i, "A").Value = _
Application.WorksheetFunction.Replace(Cells(i, "A").Value, nIndex,
1, "")