#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default Text to 4 columns

I have a column which contains values formatted to be separated by a space.
There are only going to be 4 values; I would like to move them into 4
different columns.
An example of the expression would be "253569 568J8 EJ139 Started"
I realize I can do a text to column function, but I wanted to build a
formula because this will be repeated every time the sheet is used.

The numbers are going to be in column "B", and I would like to separate them
into "C", "D", "E" and "F".

Can anyone provide an example?

TIA
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Text to 4 columns

Source data in A1 down

In B1:
=LEFT(A1,SEARCH(" ",A1)-1)
In C1:
=MID(A1,SEARCH(" ",A1)+1,SEARCH(" ",A1,SEARCH(" ",A1)+1)-SEARCH(" ",A1))
In D1:
=MID(A1,SEARCH(" ",A1,SEARCH(" ",A1)+1)+1,SEARCH(" ",A1,SEARCH("
",A1,SEARCH(" ",A1)+1)+1)-SEARCH(" ",A1,SEARCH(" ",A1)+1))
In E1:
=RIGHT(A1,LEN(A1)-SEARCH(" ",A1,SEARCH(" ",A1,SEARCH(" ",A1)+1)+1))

Copy B1:E1 down as far as required

B1 returns as text. If you need it as a number,
use instead in B1: =LEFT(A1,SEARCH(" ",A1)-1)+0
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


"billinr" wrote:

I have a column which contains values formatted to be separated by a space.
There are only going to be 4 values; I would like to move them into 4
different columns.
An example of the expression would be "253569 568J8 EJ139 Started"
I realize I can do a text to column function, but I wanted to build a
formula because this will be repeated every time the sheet is used.

The numbers are going to be in column "B", and I would like to separate them
into "C", "D", "E" and "F".

Can anyone provide an example?

TIA

  #3   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Text to 4 columns

Oops, missed that bit about the source data in col B.
Adjust all 4 formulas accordingly to point to B1 instead of A1
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


"Max" wrote:

Source data in A1 down

In B1:
=LEFT(A1,SEARCH(" ",A1)-1)
In C1:
=MID(A1,SEARCH(" ",A1)+1,SEARCH(" ",A1,SEARCH(" ",A1)+1)-SEARCH(" ",A1))
In D1:
=MID(A1,SEARCH(" ",A1,SEARCH(" ",A1)+1)+1,SEARCH(" ",A1,SEARCH("
",A1,SEARCH(" ",A1)+1)+1)-SEARCH(" ",A1,SEARCH(" ",A1)+1))
In E1:
=RIGHT(A1,LEN(A1)-SEARCH(" ",A1,SEARCH(" ",A1,SEARCH(" ",A1)+1)+1))

Copy B1:E1 down as far as required

B1 returns as text. If you need it as a number,
use instead in B1: =LEFT(A1,SEARCH(" ",A1)-1)+0
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


"billinr" wrote:

I have a column which contains values formatted to be separated by a space.
There are only going to be 4 values; I would like to move them into 4
different columns.
An example of the expression would be "253569 568J8 EJ139 Started"
I realize I can do a text to column function, but I wanted to build a
formula because this will be repeated every time the sheet is used.

The numbers are going to be in column "B", and I would like to separate them
into "C", "D", "E" and "F".

Can anyone provide an example?

TIA

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default Text to 4 columns

Perfect solution - as usual!

Thanks for your help.

"Max" wrote:

Oops, missed that bit about the source data in col B.
Adjust all 4 formulas accordingly to point to B1 instead of A1
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


"Max" wrote:

Source data in A1 down

In B1:
=LEFT(A1,SEARCH(" ",A1)-1)
In C1:
=MID(A1,SEARCH(" ",A1)+1,SEARCH(" ",A1,SEARCH(" ",A1)+1)-SEARCH(" ",A1))
In D1:
=MID(A1,SEARCH(" ",A1,SEARCH(" ",A1)+1)+1,SEARCH(" ",A1,SEARCH("
",A1,SEARCH(" ",A1)+1)+1)-SEARCH(" ",A1,SEARCH(" ",A1)+1))
In E1:
=RIGHT(A1,LEN(A1)-SEARCH(" ",A1,SEARCH(" ",A1,SEARCH(" ",A1)+1)+1))

Copy B1:E1 down as far as required

B1 returns as text. If you need it as a number,
use instead in B1: =LEFT(A1,SEARCH(" ",A1)-1)+0
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


"billinr" wrote:

I have a column which contains values formatted to be separated by a space.
There are only going to be 4 values; I would like to move them into 4
different columns.
An example of the expression would be "253569 568J8 EJ139 Started"
I realize I can do a text to column function, but I wanted to build a
formula because this will be repeated every time the sheet is used.

The numbers are going to be in column "B", and I would like to separate them
into "C", "D", "E" and "F".

Can anyone provide an example?

TIA

  #5   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Text to 4 columns

Welcome, and thanks for the feedback.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"billinr" wrote in message
...
Perfect solution - as usual!

Thanks for your help.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining Text from 2 Columns into 1 then Deleting the 2 Columns sleepindogg Excel Worksheet Functions 5 September 19th 08 12:36 AM
help with sorting text in columns to match other columns rkat Excel Discussion (Misc queries) 1 August 11th 06 03:42 AM
merge text from 2 columns into 1 then delete the old 2 columns sleepindogg Excel Worksheet Functions 4 March 30th 06 07:25 PM
Excel is automatically doing "text to columns" upon paste text. robert10000 Excel Discussion (Misc queries) 1 June 15th 05 07:49 PM
Linking text columns with text and data columns Edd Excel Worksheet Functions 0 March 17th 05 04:23 PM


All times are GMT +1. The time now is 11:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"