ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Remove specific text from a column of cells (https://www.excelbanter.com/excel-discussion-misc-queries/117447-remove-specific-text-column-cells.html)

Sweepea

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.

Gary''s Student

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.


Don Guillett

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.




Biff

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.




Carole O

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.


Sweepea

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.


Don Guillett

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.




Gary''s Student

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.



All times are GMT +1. The time now is 01:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com