# Seperate team name and odds to 2 seperate cells

#### ronie85

##### Board Regular
I require a formula to give me the team name in one cell and the odds in another. Basically separate the letters and numbers. For the odds I require possibly an =right formula to give me everything on the right of the ‘space’ that is furthest right. I’m not sure how to explain getting the name separated, can someone help?

 QPR 17/10 Draw 19/10 Stoke 9/5 Aston Villa 100/30 Draw 13/5 Arsenal 4/5 Burnley 6/4 Draw 21/10 Sunderland 19/10

<tbody>
</tbody>

### Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
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:
That formula works for;

 Leicester (19/4) Draw (31/10) Man Utd (4/6) Tottenham (8/15) Draw (10/3) West Brom (13/2)

<tbody>
</tbody>

But when I put it in for

 QPR 17/10 Draw 19/10 Stoke 9/5 QPR 17/10 Aston Villa 100/30 Draw 13/5 Arsenal 4/5 Aston Villa 100/30

<tbody>
</tbody>
It returns the exact same contents

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.

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
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
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``````

Replies
19
Views
1K
Replies
3
Views
240
Replies
2
Views
219
Replies
7
Views
188
Replies
2
Views
321

1,216,130
Messages
6,129,064
Members
449,485
Latest member
greggy

### 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.

### Which adblocker are you using?

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

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