Solved

formula or macro to split txt

Posted on 2014-02-21
5
153 Views
Last Modified: 2014-02-21
Hi experts excel 2007

I have in col o3 the following name and address which I want to split in individual cells u3 on wards
O3= mr psrm simn john 37 devon close fleetwoid fy7 7ea

Whats the best way to achieve this
0
Comment
Question by:route217
  • 2
  • 2
5 Comments
 
LVL 8

Expert Comment

by:itjockey
ID: 39876337
how do u want to split text? one word per cell?
0
 

Author Comment

by:route217
ID: 39876354
Apologies thats correct.
0
 
LVL 13

Expert Comment

by:akb
ID: 39876369
=+LEFT(O3,FIND(" ",O3)-1)   Will give you the first word
=+MID(O3,FIND(" ",O3)+1,LEN(O3))    Will give you the remaining text

Keep repeating the formulae until you have separated each word
0
 
LVL 13

Assisted Solution

by:akb
akb earned 250 total points
ID: 39876379
Came up with better formulae:

=TRIM(MID(SUBSTITUTE(O3," ",REPT(" ",30)),30*(XXX-COLUMN(O3))+1,30))

Substitue XXX for whichever word you are after

eg. if you want the third word use:
=TRIM(MID(SUBSTITUTE(O3," ",REPT(" ",30)),30*(3-COLUMN(O3))+1,30))
0
 
LVL 8

Accepted Solution

by:
itjockey earned 250 total points
ID: 39876381
ABC
Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now