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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,304
Office Version
  1. 365
Platform
  1. Windows
Why not continue in the original thread?

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

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
How about?

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

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

Forum statistics

Threads
1,141,847
Messages
5,708,959
Members
421,601
Latest member
Garlo

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