ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Text to columns (https://www.excelbanter.com/excel-programming/406867-text-columns.html)

Bill

Text to columns
 
I have data in the form of 2.00 x 3.00 x 5.00 CRS. I want to seperate the
CRS into a new column. Sometimes there is only 2 values before crs such as
2.00 x 4.00 CRS, but what I want to seperate is always last and always has a
space before it. Can anyone help?

Thanks
Bill

DKS

Text to columns
 
You have answered your question yourself.

Use the TEXT TO COLUMNS option.

When prompted for fixed width or delimited by, select delimited by. On the
next selection screen specify "space".
On the next selection screen, you can always decide which columns to "SKIP".

That should help you get the CRS in a new column, or even avoid getting CRS
(if you use SKIP option).



"Bill" wrote:

I have data in the form of 2.00 x 3.00 x 5.00 CRS. I want to seperate the
CRS into a new column. Sometimes there is only 2 values before crs such as
2.00 x 4.00 CRS, but what I want to seperate is always last and always has a
space before it. Can anyone help?

Thanks
Bill


Bill

Text to columns
 
Yes thanks you, but I want this in a macro and there will be a column with
many rows of similar data.

"DKS" wrote:

You have answered your question yourself.

Use the TEXT TO COLUMNS option.

When prompted for fixed width or delimited by, select delimited by. On the
next selection screen specify "space".
On the next selection screen, you can always decide which columns to "SKIP".

That should help you get the CRS in a new column, or even avoid getting CRS
(if you use SKIP option).



"Bill" wrote:

I have data in the form of 2.00 x 3.00 x 5.00 CRS. I want to seperate the
CRS into a new column. Sometimes there is only 2 values before crs such as
2.00 x 4.00 CRS, but what I want to seperate is always last and always has a
space before it. Can anyone help?

Thanks
Bill


Ron Rosenfeld

Text to columns
 
On Thu, 28 Feb 2008 10:40:00 -0800, Bill
wrote:

I have data in the form of 2.00 x 3.00 x 5.00 CRS. I want to seperate the
CRS into a new column. Sometimes there is only 2 values before crs such as
2.00 x 4.00 CRS, but what I want to seperate is always last and always has a
space before it. Can anyone help?

Thanks
Bill


This UDF will return the last word in a string:

====================
Function LastWord(str As String) As String
LastWord = Split(str)(UBound(Split(str)))
End Function
=======================

If there might be trailing spaces, then:

==========================
Function LastWord(str As String) As String
LastWord = Split(Trim(str))(UBound(Split(Trim(str))))
End Function
==========================
--ron


All times are GMT +1. The time now is 09:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com