Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
CADManBill
 
Posts: n/a
Default Convert Text to Number

I have a string that is numbers and text that I need to "Extract" the
characters that need, as numbers. Then "CONVERT" them to numbers.

Example string: ABC1/2x5

I can "Extract" the 1/2, Now I need the "1/2" converted to .5
  #2   Report Post  
Max
 
Posts: n/a
Default Convert Text to Number

Assuming it's always a single digit before and after the "/",
then this would suffice:

With the string in A1, try in B1:

=MID(A1,SEARCH("/",A1)-1,1)
/MID(A1,SEARCH("/",A1)+1,1)

(Hang around for better answers from others <g)
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"CADManBill" wrote in message
...
I have a string that is numbers and text that I need to "Extract" the
characters that need, as numbers. Then "CONVERT" them to numbers.

Example string: ABC1/2x5

I can "Extract" the 1/2, Now I need the "1/2" converted to .5



  #3   Report Post  
Max
 
Posts: n/a
Default Convert Text to Number

Another take on the post, focusing on the line:
I can "Extract" the 1/2, Now I need the "1/2" converted to .5


Assuming the extracted text string "1/2" is in A1,
try in B1:

=LEFT(A1,SEARCH("/",A1)-1)
/RIGHT(A1,LEN(A1)-SEARCH("/",A1))

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--


  #4   Report Post  
CADManBill
 
Posts: n/a
Default Convert Text to Number

Thank a bunc, that works and save me another headache!

"Max" wrote:

Another take on the post, focusing on the line:
I can "Extract" the 1/2, Now I need the "1/2" converted to .5


Assuming the extracted text string "1/2" is in A1,
try in B1:

=LEFT(A1,SEARCH("/",A1)-1)
/RIGHT(A1,LEN(A1)-SEARCH("/",A1))

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--



  #5   Report Post  
CADManBill
 
Posts: n/a
Default Convert Text to Number

Now, what if there is more than one "/".

Example: ABC1/2x5 1/2
Return 1/2 as .5000

"Max" wrote:

Another take on the post, focusing on the line:
I can "Extract" the 1/2, Now I need the "1/2" converted to .5


Assuming the extracted text string "1/2" is in A1,
try in B1:

=LEFT(A1,SEARCH("/",A1)-1)
/RIGHT(A1,LEN(A1)-SEARCH("/",A1))

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--





  #6   Report Post  
Max
 
Posts: n/a
Default Convert Text to Number

"CADManBill" wrote
Now, what if there is more than one "/".

Example: ABC1/2x5 1/2
Return 1/2 as .5000


Assume you're referring to the 2nd instance of "1/2"
located after the space in the string

If A1 contains: ABC1/2x5 1/2

Try in B1:

=MID(A1,SEARCH(" ",A1)+1,
SEARCH("/",A1,SEARCH(" ",A1))-SEARCH(" ",A1)-1)
/ MID(A1,SEARCH("/",A1,SEARCH(" ",A1))+1,99)

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--


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
how can I convert numeric number into text firas Excel Discussion (Misc queries) 1 September 21st 05 07:05 PM
Text number to number value for calculating ddiebold7 Excel Worksheet Functions 3 June 13th 05 12:48 PM
How to COnvert text string to number timtak Excel Discussion (Misc queries) 3 June 4th 05 04:57 AM
Sort or Filter option? Mcobra41 Excel Worksheet Functions 3 February 23rd 05 07:22 PM
Convert Numeric into Text Monty Excel Worksheet Functions 0 December 18th 04 09:25 PM


All times are GMT +1. The time now is 03:11 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"