Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

formula or macro to split txt

Posted on 2014-02-21
5
Medium Priority
?
163 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:Naresh Patel
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 1000 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:
Naresh Patel earned 1000 total points
ID: 39876381
ABC
Thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

886 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