DISCONCATENATE … UNCONCATENATE… Lose the CONCATENATION…!!!

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,843
Office Version
  1. 2010
Platform
  1. Windows
What a title... LOL

Sorry, I should know this but I can’t think how to do it…
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
How do I “split” my return in A1 to get the name before the "|" in C1 and the name after the "|" in D1 please?

Excel Workbook
ABCD
1Norwich City|WatfordNorwich CityWatford
Sheet1



<o:p></o:p>
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hello

Code:
C1: =MID(A1,1,SEARCH("|",A1)-1)
D1: =MID(A1,SEARCH("|",A1)+1,9^9)

Or text-to-columns, but then the results would occur in A1 and B1.
 
Upvote 0
Hello

Code:
C1: =MID(A1,1,SEARCH("|",A1)-1)
D1: =MID(A1,SEARCH("|",A1)+1,9^9)

Or text-to-columns, but then the results would occur in A1 and B1.

Thanks for that, it works!... Could I just ask about the 9^9 though… Is that a way of dealing with an x amount of characters’?

Excel Workbook
ABCD
1Norwich City|WatfordNorwich CityWatford
2Bristol City|MillwallBristol CityMillwall
3Coventry City|PortsmouthCoventry CityPortsmouth
4Hull City|Swansea CityHull CitySwansea City
5Preston North End|Doncaster RoversPreston North EndDoncaster Rovers
6QPR|BarnsleyQPRBarnsley
7Reading|Scunthorpe UnitedReadingScunthorpe United
Sheet1
 
Upvote 0
Or text-to-columns, but then the results would occur in A1 and B1.
I would use Text to Columns. At step 3 of the wizard you could enter C1 in the 'Destination:' box.

Edit: If using formulas, I would use
C1: =LEFT(A1,FIND("|",A1)-1)
D1: =SUBSTITUTE(A1,C1&"|","")
 
Last edited:
Upvote 0
Could I just ask about the 9^9 though… Is that a way of dealing with an x amount of characters’?
You could calculate the exact length, but since every number greater than that also works, I prefer 9^9 or 999.
 
Upvote 0
Thanks Peter, thanks shift-del, this one is sorted now...!:)
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

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