View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Remove specific text from a column of cells

My previous posting will only remove Oct data. If the text has an aribtrary
number of words and the date is always the last three words in the cell then
this little UDF will remove then:

Function sweepea(s As String) As String
ss = Split(s, " ")
For i = 0 To UBound(ss) - 3
sweepea = sweepea & ss(i) & " "
Next
End Function
--
Gary's Student


"Sweepea" wrote:

Example:

Apple and Pear Oct 2,2006
Orange and Lime Oct 30,2006
Pear and Pineapple Oct 6, 2006

I want to remove the date at the end of each cell. Can someone help? Thank
you.