Have a text string in a specific format, that I'd like split up into 3 adjacent cells based on formulas

freeb1893

Board Regular
Joined
Jul 30, 2012
Messages
234
Office Version
  1. 365
Platform
  1. Windows
I have a name variation I'm working with that is like the following example:

"Project Type - (Main Component) Additional Information"

I want process the above quoted text string into 3 cells. I was all the text before the dash in 1 cell, all the text in the () is a 2nd cell, and everything after the ") " in a 3rd cell.

Anyone know the formulas I need in my 3 cells to process this text string in such a way? Thanks in advance!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi,
If the user always uses the syntax you describe:

Let's say for this example, the original data is in cell B2 and you want the splits to happen in C2, D2 and E2
C2 code should be =TRIM(LEFT(B2,FIND("-",B2)-1))
D2 code should be =TRIM(MID(B2,FIND("(",B2),FIND(")",B2)-FIND("(",B2)+1))
E2 code should be =TRIM(MID(B2,FIND(")",B2)+1,999))
 
Upvote 0
Hi,

Think this is what you mean:


Book1
ABCD
1"Project Type - (Main Component) Additional Information"Project TypeMain ComponentAdditional Information
Sheet10
Cell Formulas
RangeFormula
B1=TRIM(MID(A1,2,FIND("-",A1)-2))
C1=MID(A1,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1)
D1=SUBSTITUTE(TRIM(MID(A1,FIND(")",A1)+1,255)),CHAR(34),"")


Results excludes the quote marks, and brackets.
 
Upvote 0
I know the difference between SEARCH and FIND, but what's the Lower and/or Upper case of " , ( , and ) ?

I use SEARCH when there's a possible Upper/Lower case.
 
Last edited:
Upvote 0
:-) Wasn't scolding anyone, just informing those who might not be aware of the difference. Obvious my answer didn't use search AND was clunkier than yours and JoeMos answer. No offense meant.
 
Upvote 0
My apologies, didn't mean to sound like I was "snapping back" neither, but it's Good that you pointed out the difference between the SEARCH and FIND functions.:)

And I might have misunderstood OP, maybe the quotes before and after the Text string is Not in the Real data but just in the post to show us the Text string, in which case, my formulas will need to be modified.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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