Seperate team name and odds to 2 seperate cells

ronie85

Board Regular
Joined
Jan 25, 2014
Messages
89
Office Version
  1. 365
Platform
  1. Windows

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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:
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,167
Members
448,554
Latest member
Gleisner2

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