View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tony D[_2_] Tony D[_2_] is offline
external usenet poster
 
Posts: 4
Default Complie error: can't find project or library

Hi, the "left" is creating error. I am trying to delete "cu" if it represents
the first two characters in the cell.

Sub Step8_CleanUpAllSheet()

Dim r As Integer


For r = Cells(65536, 4).End(xlUp).Row To 2 Step -1


If Left(Cells(r, 4), 2) = "cu" Then
Cells(r, 4).TextToColumns Destination:=Cells(r, 4),
DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 9), Array(2, 1)),
TrailingMinusNumbers:=True
End If
Next r


End Sub