Thread: Trim cells
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme Bernard Liengme is offline
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?