View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default Help with TRIM Function

See one more response to your other post.

Willie T wrote:

Ron,

Thanks, i can see how in works inside the spreadsheet, but can i add
your statement to my existing TRIM statement so that it will be handled
in my existing VBA code on the fly. In other words combine my TRIM
statement as follows:

If LCase(Left(Trim(myLine), Len(StrPID))) = StrPID Then
wks.Cells(oRow, "A").Value = Trim(Mid(myLine, Len(StrPID) +
7))

with your suggested statement

=MID(B1,1,SEARCH("G",B1,1)-1)
so that the output will be as desired.

Thanks again,

Willie T


--

Dave Peterson