Remove Part Of A Text String

Kurt

Well-known Member
Joined
Jul 23, 2002
Messages
1,664
I have the following info in cell D5: MECH^CHU-BSW-PF

Using the following VBA code what do I add to take out the MECH^ part of the text string in cell D5?

My code needs to stay in this format just FYI.

Code:
    AddFormula TopLeft.Offset(1, 2).Resize(RowCount, 1), "=IFERROR(LEFT(AA" & Row & ",FIND(""^"",AA" & Row & ")+10),"""")"
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
It's hard to understand what you want, since your existing code does not reference D5.

The expression to return the value of D5 with "MECH^" removed is

Code:
Replace(Range("D5"), "MECH^", "")

but I have no idea how you want to use that in your existing code.
 
Upvote 0

Forum statistics

Threads
1,215,693
Messages
6,126,237
Members
449,304
Latest member
hagia_sofia

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top