Separate Text into 2 Columns

Status
Not open for further replies.

allanTeh

New Member
Joined
Jun 29, 2006
Messages
43
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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Why not continue in the original thread?

As for your question, take a look at the TRIM function.
 
Upvote 0
How about?

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

C1: =RIGHT(A1,LEN(A1)-FIND(" v ",A1)-2)
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,907
Messages
6,122,181
Members
449,071
Latest member
cdnMech

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