# Separate Text into 2 Columns

Status
Not open for further replies.

#### allanTeh

##### New Member
I copied sport's schedule from website into my Excel Sheet.

In a column (let's say Column 'A') I have this text:

A1 : San Francisco v New York
A2 : Miami v Detroit
A3 : New York v Miami
etc...

I want to create 2 columns:-

In one Column (lets say Column 'B') to keep the FIRST PART of the text (of Column 'A'), and that is:- San Francisco

In next Column (lets say Column 'C') to keep the SECOND PART of the text (of Column 'A'), and that is:- New York

Problem: What is the function/formula I should type in Columns B and C to make it happen ?

(The formula/function to be used should make use of space, v, space that appear in every cells in Column 'A')

In my previous posting, I got reply asking me to type in Column 'B' and 'C' the following:

in B1 :
=LEFT(A1,FIND(" v",A1&" v"))

and in C1 :
=SUBSTITUTE(A1,B1&"v ","")

The problem I just discovered is that the data resulted in Column 'B' have a space at the end of the team's name, whereas in Column 'C', there isn't.

This inconsistency will effect my data manipulation later, for example, when I need to total up all match points by a particular team, let's say New York ?

I experimented by adjusting formula in B1 to become as below :

=LEFT(A1,FIND(" v",A1&" v")-1)

and it successfully eliminated (in Column 'B') the space at the end of the team's name BUT the data in C1 become WRONG in that all the text in A1 appeared in C1.

So, anyone with better method ?

Pls HELP !!!

### Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Why not continue in the original thread?

As for your question, take a look at the TRIM function.

B1: =LEFT(A1,FIND(" v ",A1)-1)

C1: =RIGHT(A1,LEN(A1)-FIND(" v ",A1)-2)

Status
Not open for further replies.

Replies
5
Views
217
Replies
4
Views
167
Replies
12
Views
715
Replies
2
Views
119
Replies
0
Views
423

1,217,673
Messages
6,137,921
Members
450,098
Latest member
Ikmal Sabri

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