Remove second part of hyphenated word

kbianco

New Member
Joined
Aug 9, 2023
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hi there,

Trying to convert text within one cell to a simplified version. For example, I have a cell that reads "UK Fund Mid-Cap Blend" but I want to convert this to "Mid Blend". Right now, I am using the below formula to strip "UK Fund Mid-Cap Blend" down to "Mid-Cap Blend". cell C9 represents the full text string.

=MID(C9,FIND("@",SUBSTITUTE(C9," ","@",LEN(C9)-LEN(SUBSTITUTE(C9," ",""))-1))+1,100)

I want to take this one step further and remove the "-Cap" portion of Mid-Cap, so that the cell just reads "Mid Blend". Also, i want to be able to use this across a variety of inputs. I.e Will need to convert Mid-Cap Growth to Mid Growth.

Any ideas?

Thanks!
Kayla
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Perhaps try this since you have Excel 365?
Excel Formula:
=TEXTJOIN(" ",1,TAKE(TEXTBEFORE(TEXTSPLIT(C9," "),"-",,,1),,-2))
 
Upvote 0
Solution
wow - that worked perfectly! thank you so much. appreciate the help
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,117
Members
453,021
Latest member
Justyna P

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