#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Trim cells

I have thousands of cells with text that I want to eliminate certain text or
atleast parse out. A sample of the data is below.

CPS-PL-WARSAW-PIPETEST SERVICE 4911
EDI-US-TX-VICTORIA-GEMOCO CEMENTING#4075
EDI-ZA-WUK-MOSSEL BAY #1228
CPS-SG-SINGAPORE-HWS #2727
4M RENTALS & REPAIR INC-LAFAYETTE
A&A LOCKSMITH-LAFAYETTE

I would like to just keep everything to the left of the dash. For example
my final product would look like this:
CPS
EDI
CPS
4M RENTALS & REPAIR INC
A&A LOCKSMITH

Any suggestions?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Trim cells

=LEFT(A1,FIND("-",A1)-1)
Have a look at RIGHT and MID for future problems like this
best wishes

--
Bernard Liengme
MVP Excel
http://people.stfx.ca/bliengme

"Cassius" wrote in message
...
I have thousands of cells with text that I want to eliminate certain text
or
atleast parse out. A sample of the data is below.

CPS-PL-WARSAW-PIPETEST SERVICE 4911
EDI-US-TX-VICTORIA-GEMOCO CEMENTING#4075
EDI-ZA-WUK-MOSSEL BAY #1228
CPS-SG-SINGAPORE-HWS #2727
4M RENTALS & REPAIR INC-LAFAYETTE
A&A LOCKSMITH-LAFAYETTE

I would like to just keep everything to the left of the dash. For example
my final product would look like this:
CPS
EDI
CPS
4M RENTALS & REPAIR INC
A&A LOCKSMITH

Any suggestions?

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
TRIM Nikki Excel Discussion (Misc queries) 3 April 22nd 09 05:56 PM
=TRIM Shayra Excel Discussion (Misc queries) 5 October 16th 08 07:16 PM
Trim cells to a character Mike Excel Worksheet Functions 3 February 3rd 07 04:25 PM
Trim Cells aftamath Excel Discussion (Misc queries) 1 October 18th 05 04:06 PM
Trim help please Dave New Users to Excel 8 September 1st 05 07:18 PM


All times are GMT +1. The time now is 04:43 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"