A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Remove specific text from a column of cells



 
 
Thread Tools Display Modes
  #1  
Old November 3rd 06, 10:43 PM posted to microsoft.public.excel.misc
Sweepea
external usenet poster
 
Posts: 28
Default Remove specific text from a column of cells

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.
Ads
  #2  
Old November 3rd 06, 11:05 PM posted to microsoft.public.excel.misc
Gary''s Student
external usenet poster
 
Posts: 11,059
Default Remove specific text from a column of cells

=LEFT(A1,FIND("Oct",A1,1)-2) will remove the date for October data.
--
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.

  #3  
Old November 3rd 06, 11:09 PM posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
 
Posts: 10,124
Default Remove specific text from a column of cells


One TOO simple way would be to have a helper column
=left(a2,len(a2)-11)
Leaves a space on the single digit but probably doesn't matter.

--
Don Guillett
SalesAid Software

"Sweepea" > wrote in message
...
> 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.



  #4  
Old November 3rd 06, 11:16 PM posted to microsoft.public.excel.misc
Biff
external usenet poster
 
Posts: 1,688
Default Remove specific text from a column of cells

Based on your samples the date appears after the 3rd space. If that's
consistent within your data:

=LEFT(A1,FIND("~",SUBSTITUTE(A1," ","~",3))-1)

Biff

"Sweepea" > wrote in message
...
> 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.



  #5  
Old November 3rd 06, 11:24 PM posted to microsoft.public.excel.misc
Carole O
external usenet poster
 
Posts: 69
Default Remove specific text from a column of cells

Try Edit, Replace, and in Find What type in Oct * Then click on Replace
or Replace All at the bottom.

Carole O

"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.

  #6  
Old November 3rd 06, 11:26 PM posted to microsoft.public.excel.misc
Sweepea
external usenet poster
 
Posts: 28
Default Remove specific text from a column of cells

Thank you all for your help! It works! :-)


"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.

  #7  
Old November 4th 06, 12:27 AM posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
 
Posts: 10,124
Default Remove specific text from a column of cells

The archives want to know what you used

--
Don Guillett
SalesAid Software

"Sweepea" > wrote in message
...
> Thank you all for your help! It works! :-)
>
>
> "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.



  #8  
Old November 4th 06, 10:42 AM posted to microsoft.public.excel.misc
Gary''s Student
external usenet poster
 
Posts: 11,059
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.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
count specific text that occurs in a range of cells Tim Excel Discussion (Misc queries) 16 October 10th 06 01:41 AM
count cells that begin with specific text mmer at steelcase Excel Worksheet Functions 7 July 25th 06 09:03 PM
how insert same text in empty cells in column (10000 rows) bromptongadgets Excel Worksheet Functions 1 December 11th 05 03:13 PM
extract specific info from cells in a column Herman New Users to Excel 1 October 27th 05 03:01 AM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM


All times are GMT +1. The time now is 06:20 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 2004-2014 ExcelBanter.
The comments are property of their posters.