Remove always the same characteres from differents texts

andrefraga

New Member
Joined
Feb 18, 2016
Messages
15
Hello,

I Have the below kind ot text that repeats over 100-200 lines:

8-LL-001D-RJS / MSIAG-01 - (GI) 1 tramo - ESPECIAL
8-LL-014D-RJS / MSIAG-02 -(GI) 1 tramo - FL
3-RJS-739 (PO) - 7 tramos
and many other "X-XX-XXX - X tramos"

I need a new text which is always the words left to the left of "X tramos.."
Example:
8-LL-001D-RJS / MSIAG-01 - (GI) 1 tramo - ESPECIAL -> 8-LL-001D-RJS / MSIAG-01 - (GI)
8-LL-014D-RJS / MSIAG-02 -(GI) 1 tramo - FL -> 8-LL-014D-RJS / MSIAG-02 -(GI)
3-RJS-739 (PO) - 7 tramos -> 3-RJS-739 (PO)

Atention that sometimes we have singular and sometimes plural (1 tramos, 2 tramos). Actually don't know if this matters.

Could anyone help me, please?
Thanks in advance!
 

Some videos you may like

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

mumps

Well-known Member
Joined
Apr 11, 2012
Messages
9,732
If there will always be ")" character to the left of "1 tramos", this formula should work: =LEFT(A1,FIND(")",A1,1))
 

Yongle

Well-known Member
Joined
Mar 11, 2015
Messages
6,871
Office Version
  1. 365
Platform
  1. Windows
This may not apply to the rest of your data but it works with the sample data
=LEFT(A1,SEARCH(")",A1))
 

Watch MrExcel Video

Forum statistics

Threads
1,113,907
Messages
5,544,984
Members
410,647
Latest member
LegenDSlayeR
Top