Seperate team name and odds to 2 seperate cells

ronie85

New Member
Joined
Jan 25, 2014
Messages
47

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Snakehips

Well-known Member
Joined
May 17, 2009
Messages
5,561
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
ronie85,

Try....

Excel 2007
BCD
6Aston Villa 100/30Aston Villa100/30
7Draw 13/1Draw13/1
Sheet3
Cell Formulas
RangeFormula
C6=TRIM(SUBSTITUTE(B6,D6,""))
D6=TRIM(RIGHT(SUBSTITUTE(B6," ",REPT(" ",10)),10))


Hope that helps.
 
Last edited:

Snakehips

Well-known Member
Joined
May 17, 2009
Messages
5,561
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I did not realise that they were hyperlinks in your first post.

I'm pretty sure that you will not be able to split the 'displayed "friendly name' of a hyperlink without using vba.
 

Snakehips

Well-known Member
Joined
May 17, 2009
Messages
5,561
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Open the vba editor and copy the below code into a CODE Module.

You can then use it as worksheet function to split the end off either straight text or off the hyperlink 'friendly name'
Set second argument prt as 1 for the left part and to 2 for the right part.
eg


Excel 2007
ABCD
6Text >>>>Aston Villa (100/30)Aston Villa(100/30)
7Text >>>>Draw 13/1Draw13/1
8Hyperlink >>>>>QPR (17/10)QPR(17/10)
Sheet3
Cell Formulas
RangeFormula
C6=Split_It(B6,1)
D6=Split_It(B6,2)


Code:
Function Split_It(rng As Range, prt As Integer) As String
Dim Arry() As String
If rng.Hyperlinks.Count > 0 Then
Arry = Split(rng.Hyperlinks(1).TextToDisplay)
Else
Arry = Split(rng.Value)
End If
If Not prt = 1 Then
Split_It = Arry(UBound(Arry()))
Else
Arry(UBound(Arry())) = ""
Split_It = Join(Arry(), " ")
End If
End Function
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,017
Messages
5,834,960
Members
430,330
Latest member
drAli77

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
Top