Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
MrBill
 
Posts: n/a
Default Extract Numbers from Alpha-Numeric String

I have an Alpha-Numeric String. I need to Extract the numbers and use them in
calculations.

Example String: PL1 1/2x5 1/2
I need to return the "1 1/2" as 1.5
And the "5 1/2" as 5.5
I guess it would be easier to say that I need to "OMIT" the Leading Alpha
Characters, Replace the Fractionals to Decimals, replace the "x" with *.
The result to be: 1.5*5.5
  #2   Report Post  
Roger Govier
 
Posts: n/a
Default Extract Numbers from Alpha-Numeric String

Hi

Try
=TEXT(MID(A1,3,5),"0.00")&" * "&TEXT(MID(A1,9,5),("0.00"))
This works fine with the sample shown.
If the numbers are going to be larger, I think I would use a helper cell to
split off the leading Alpha's e.g. in cell B1
=MID(A1,3,255)
then on the resulting cell use
=TEXT(LEFT(B1,FIND("x",B1)-1),"0.00")&" * "
&TEXT(MID(B1,FIND("x",B1)+1,20),"0.00")


Regards

Roger Govier


MrBill wrote:
I have an Alpha-Numeric String. I need to Extract the numbers and use them in
calculations.

Example String: PL1 1/2x5 1/2
I need to return the "1 1/2" as 1.5
And the "5 1/2" as 5.5
I guess it would be easier to say that I need to "OMIT" the Leading Alpha
Characters, Replace the Fractionals to Decimals, replace the "x" with *.
The result to be: 1.5*5.5

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
The colums changed from alpha to numeric how do you make it alpha worldmade Excel Discussion (Misc queries) 2 May 26th 05 03:44 PM
Extract hyperlink string from excel cell Ryan Sapien Links and Linking in Excel 1 January 20th 05 12:24 AM
extracting numbers from string Chris Dowell via OfficeKB.com Excel Discussion (Misc queries) 1 January 12th 05 09:37 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM
How do you extract numbers from a string of chacters in a cell (E. blackbeemer Excel Worksheet Functions 6 November 12th 04 09:00 AM


All times are GMT +1. The time now is 11:20 AM.

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

About Us

"It's about Microsoft Excel"