![]() |
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? |
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? |
All times are GMT +1. The time now is 07:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com