View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Removing section of a string in VBA

Hi Jake,
If cell A1 contains "1) Student work samples - A sample of student work
needs to be presented and dated." then the following worksheet function
extracts "Student work sample" by finding the ")" and "-". It does rely
on there being a space after the ")" and before the "-":

=MID(A1,FIND(")",A1,1)+2,FIND("-",A1,1)-FIND(")",A1,1)-3)

You could use this without any VB or adapt it to your code.

Ken Johnson