ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Converting string to number (https://www.excelbanter.com/new-users-excel/258108-converting-string-number.html)

kenppy

Converting string to number
 
hi,

I have a set of data that is to be cut and pasted from an external
source.
A typical cell reads '32813.58 sq mm', without the speech marks.
The cell could be formatted before the pasting; but how do I strip off
the units to leave the number only? The number could be any size.

thanks

Russell Dawson[_2_]

Converting string to number
 
=LEFT(A1, LEN(A1)-5)

Will return your data as required as long as the text to be stripped is
constant
--
Russell Dawson
Excel Student

Please hit "Yes" if this post was helpful.


"kenppy" wrote:

hi,

I have a set of data that is to be cut and pasted from an external
source.
A typical cell reads '32813.58 sq mm', without the speech marks.
The cell could be formatted before the pasting; but how do I strip off
the units to leave the number only? The number could be any size.

thanks
.


Russell Dawson[_2_]

Converting string to number
 
Another alternative if you are pasting text into Excel is to use the text to
columns facility.

You'll find this under data - text to columns. Ask again if you need more
help on this.
--
Russell Dawson
Excel Student

Please hit "Yes" if this post was helpful.


"kenppy" wrote:

hi,

I have a set of data that is to be cut and pasted from an external
source.
A typical cell reads '32813.58 sq mm', without the speech marks.
The cell could be formatted before the pasting; but how do I strip off
the units to leave the number only? The number could be any size.

thanks
.


kenppy

Converting string to number
 

This works but is still a string, how do I turn this to number?
thanks
says...
=LEFT(A1, LEN(A1)-5)

Will return your data as required as long as the text to be stripped is
constant


kenppy

Converting string to number
 
The data is already loading into columns but the length of the stuff to
strip may not be predicted, how would this be treated?
thanks

says...
Another alternative if you are pasting text into Excel is to use the text to
columns facility.

You'll find this under data - text to columns. Ask again if you need more
help on this.


Bob Phillips[_4_]

Converting string to number
 

=--LEFT(A1, LEN(A1)-5)


--

HTH

Bob

"kenppy" wrote in message
om...

This works but is still a string, how do I turn this to number?
thanks
says...
=LEFT(A1, LEN(A1)-5)

Will return your data as required as long as the text to be stripped is
constant




Luke M[_4_]

Converting string to number
 
=VALUE(LEFT(A1, LEN(A1)-5))

--
Best Regards,

Luke M
"kenppy" wrote in message
om...

This works but is still a string, how do I turn this to number?
thanks
says...
=LEFT(A1, LEN(A1)-5)

Will return your data as required as long as the text to be stripped is
constant




Luke M[_4_]

Converting string to number
 
Under Data - Text to Columns, choose delimited. Then choose space as your
delimiter.

--
Best Regards,

Luke M
"kenppy" wrote in message
om...
The data is already loading into columns but the length of the stuff to
strip may not be predicted, how would this be treated?
thanks

says...
Another alternative if you are pasting text into Excel is to use the text
to
columns facility.

You'll find this under data - text to columns. Ask again if you need
more
help on this.




Russell Dawson[_2_]

Converting string to number
 
Sorry try
=LEFT(A1, LEN(A1)-6)
--
Russell Dawson
Excel Student

Please hit "Yes" if this post was helpful.


"kenppy" wrote:


This works but is still a string, how do I turn this to number?
thanks
says...
=LEFT(A1, LEN(A1)-5)

Will return your data as required as long as the text to be stripped is
constant

.


No Name

Converting string to number
 
Thanks all of you, it's working now

Sorry try
=LEFT(A1, LEN(A1)-6)



All times are GMT +1. The time now is 06:30 PM.

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