Extract text from a cell with multiple "-"

Status
Not open for further replies.

gromden

New Member
Joined
Jun 18, 2015
Messages
8
Office Version
  1. 365
Platform
  1. Windows
I have a product name that contains the name and the size. I only want the product name and used the following to extract the text I want out.

Example:
=TRIM(LEFT(Z1,(FIND("-",Z1,1)-1))) where cell Z contains "Leopard Print Jumpsuit (Heather Grey) - Large" and it correctly comes out as "Leopard Print Jumpsuit (Heather Grey)"

However, the issue I am coming across is that some products have another "-" in the description such as "From Time to Time V-Neck Popcorn Sweater (Light Grey) - Small" and thus it returns "From Time To Time V".

How can I change the formula so that it will work across both description types?

Thanks.


 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
A modification to the issue above. I tried using the above formula =LEFT(Z1,(FIND(")",Z1))) to this "Lilac Floral Smocked 3-4 Ruffle Sleeve Dress - S" but it returns #VALUE!

When I use LEFT($S433,(FIND("-",$S433,1)-1))) it returns Lilac Floral Smocked 3.

Any help is greatly appreciated to correct. Thanks!
 
Upvote 0
Post #4 appears to be a duplicate to: Extract text from a cell with multiple "-"

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.

In relation to your question here, I have closed this thread so please continue in the linked thread.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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