Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
BHalberstater
 
Posts: n/a
Default Remove variable text in cells

Hi,

I have a list of data that I want to edit and have tried LEFT,RIGHT & MIDDLE
formulas for editing with no luck.
Eg.

00123456 draft plan v.1 19-05-05
0012457 compliance plan v.2 26-06-05
012348 national business strategy v.2 07-06-05

I want to remove the date from each cell so it reads
00123456 draft plan v.1
0012457 compliance plan v.2
012348 national business strategy v.2

But because the cell characters vary and there isn't a common delimeter(-, _
.. ) I can't get excel to remove the date (last 8 digits) from the right.

Any help would be greatly appreciated becuase it's driving me crazy
  #2   Report Post  
Rowan
 
Posts: n/a
Default

If the data always ends in the date in this format then:

=LEFT(A1,LEN(A1)-9)

Hope this helps
Rowan

"BHalberstater" wrote:

Hi,

I have a list of data that I want to edit and have tried LEFT,RIGHT & MIDDLE
formulas for editing with no luck.
Eg.

00123456 draft plan v.1 19-05-05
0012457 compliance plan v.2 26-06-05
012348 national business strategy v.2 07-06-05

I want to remove the date from each cell so it reads
00123456 draft plan v.1
0012457 compliance plan v.2
012348 national business strategy v.2

But because the cell characters vary and there isn't a common delimeter(-, _
. ) I can't get excel to remove the date (last 8 digits) from the right.

Any help would be greatly appreciated becuase it's driving me crazy

  #3   Report Post  
Max
 
Posts: n/a
Default

One way ..

Assuming data is in col A, A1 down

Try in say, B1:

=LEFT(TRIM(A1),SEARCH(" ",TRIM(A1),SEARCH(".",TRIM(A1))))

Copy B1 down
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"BHalberstater" wrote in message
...
Hi,

I have a list of data that I want to edit and have tried LEFT,RIGHT &

MIDDLE
formulas for editing with no luck.
Eg.

00123456 draft plan v.1 19-05-05
0012457 compliance plan v.2 26-06-05
012348 national business strategy v.2 07-06-05

I want to remove the date from each cell so it reads
00123456 draft plan v.1
0012457 compliance plan v.2
012348 national business strategy v.2

But because the cell characters vary and there isn't a common delimeter(-,

_
. ) I can't get excel to remove the date (last 8 digits) from the right.

Any help would be greatly appreciated becuase it's driving me crazy



  #4   Report Post  
Harlan Grove
 
Posts: n/a
Default

Max wrote...
One way ..

Assuming data is in col A, A1 down

Try in say, B1:

=LEFT(TRIM(A1),SEARCH(" ",TRIM(A1),SEARCH(".",TRIM(A1))))

....

Could fail when there's more than one period in the text.

If the ending substring could be variable length but always preceded by
a space, it's possible to use

=LEFT(TRIM(A1),LOOKUP(2,1/(MID(TRIM(A1),ROW(INDIRECT("1:256")),1)=" "),
ROW(INDIRECT("1:256")))-1)

This relies on the functionality of the LOOKUP formula as it's worked
from Excel 97 through Excel 2003 (and probably in earlier versions as
well).

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
Format text across cells peterlsutton New Users to Excel 3 February 21st 05 07:54 PM
counting text cells Debbie Excel Worksheet Functions 4 February 8th 05 09:00 PM
Convert data of cells to any type: Number, Date&Time, Text Kevin Excel Discussion (Misc queries) 0 December 30th 04 06:55 AM
Putting text in a column based on variable text from another colum Jacky D. Excel Discussion (Misc queries) 1 December 16th 04 06:09 PM


All times are GMT +1. The time now is 02:29 AM.

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

About Us

"It's about Microsoft Excel"