Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old Tone
 
Posts: n/a
Default how to extract decimal numbers from alphanumeric strings in Excel

How do I extract decimal numbers from alphanumeric strings to perform
calculations on the number, eg 25.1 km or 100 m.
  #2   Report Post  
Domenic
 
Posts: n/a
Default

Try...

=LOOKUP(9.99999999999999E+307,--LEFT(A1,ROW(INDIRECT("1:"&LEN(A1)))))

....where A1 contains your alpha-numeric string.

Hope this helps!

In article ,
"Old Tone" <Old wrote:

How do I extract decimal numbers from alphanumeric strings to perform
calculations on the number, eg 25.1 km or 100 m.

  #3   Report Post  
B. R.Ramachandran
 
Posts: n/a
Default

Hi,

Use the formula,

=1*LEFT(A1,FIND(" ",A1)-1)

The formula should work if the alphanumeric strings are of the format you
shown in your examples, i.e., number and unit separated by a space.

Regards,
B. R. Ramachandan

"Old Tone" wrote:

How do I extract decimal numbers from alphanumeric strings to perform
calculations on the number, eg 25.1 km or 100 m.

  #4   Report Post  
Old Tone
 
Posts: n/a
Default

Many thanks works a treat

Old Tone

"B. R.Ramachandran" wrote:

Hi,

Use the formula,

=1*LEFT(A1,FIND(" ",A1)-1)

The formula should work if the alphanumeric strings are of the format you
shown in your examples, i.e., number and unit separated by a space.

Regards,
B. R. Ramachandan

"Old Tone" wrote:

How do I extract decimal numbers from alphanumeric strings to perform
calculations on the number, eg 25.1 km or 100 m.

  #5   Report Post  
Old Tone
 
Posts: n/a
Default

Many thanks. It looks a bit fearsome but works fine.

Old Tone

"Domenic" wrote:

Try...

=LOOKUP(9.99999999999999E+307,--LEFT(A1,ROW(INDIRECT("1:"&LEN(A1)))))

....where A1 contains your alpha-numeric string.

Hope this helps!

In article ,
"Old Tone" <Old wrote:

How do I extract decimal numbers from alphanumeric strings to perform
calculations on the number, eg 25.1 km or 100 m.




  #6   Report Post  
Posted to microsoft.public.excel.misc
Tim
 
Posts: n/a
Default how to extract decimal numbers from alphanumeric strings in Ex

how can i do this but with two numbers

Eg, 16m 30s

This is 16 minutes 30 seconds.

and if you know this, how can i then turn this to read a a decimal, ie,
change 16m 4s to read 16.5

Tim


"Domenic" wrote:

Try...

=LOOKUP(9.99999999999999E+307,--LEFT(A1,ROW(INDIRECT("1:"&LEN(A1)))))

....where A1 contains your alpha-numeric string.

Hope this helps!

In article ,
"Old Tone" <Old wrote:

How do I extract decimal numbers from alphanumeric strings to perform
calculations on the number, eg 25.1 km or 100 m.


  #7   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default how to extract decimal numbers from alphanumeric strings in Ex


try
to get 16:30
=TEXT(LEFT(D2,FIND("m",D2)-1)&":"&MID(D2,FIND(" ",D2),FIND("s",D2)-FIND("
",D2)),"hh:mm")
to get 16.5
=LEFT(D2,FIND("m",D2)-1)&TEXT(MID(D2,FIND(" ",D2),FIND("s",D2)-FIND("
",D2))/60,".#")
--
Don Guillett
SalesAid Software

"Tim" wrote in message
...
how can i do this but with two numbers

Eg, 16m 30s

This is 16 minutes 30 seconds.

and if you know this, how can i then turn this to read a a decimal, ie,
change 16m 4s to read 16.5

Tim


"Domenic" wrote:

Try...

=LOOKUP(9.99999999999999E+307,--LEFT(A1,ROW(INDIRECT("1:"&LEN(A1)))))

....where A1 contains your alpha-numeric string.

Hope this helps!

In article ,
"Old Tone" <Old
wrote:

How do I extract decimal numbers from alphanumeric strings to perform
calculations on the number, eg 25.1 km or 100 m.




  #8   Report Post  
Posted to microsoft.public.excel.misc
Tim
 
Posts: n/a
Default how to extract decimal numbers from alphanumeric strings in Ex

Great Thanks!



"Don Guillett" wrote:


try
to get 16:30
=TEXT(LEFT(D2,FIND("m",D2)-1)&":"&MID(D2,FIND(" ",D2),FIND("s",D2)-FIND("
",D2)),"hh:mm")
to get 16.5
=LEFT(D2,FIND("m",D2)-1)&TEXT(MID(D2,FIND(" ",D2),FIND("s",D2)-FIND("
",D2))/60,".#")
--
Don Guillett
SalesAid Software

"Tim" wrote in message
...
how can i do this but with two numbers

Eg, 16m 30s

This is 16 minutes 30 seconds.

and if you know this, how can i then turn this to read a a decimal, ie,
change 16m 4s to read 16.5

Tim


"Domenic" wrote:

Try...

=LOOKUP(9.99999999999999E+307,--LEFT(A1,ROW(INDIRECT("1:"&LEN(A1)))))

....where A1 contains your alpha-numeric string.

Hope this helps!

In article ,
"Old Tone" <Old
wrote:

How do I extract decimal numbers from alphanumeric strings to perform
calculations on the number, eg 25.1 km or 100 m.




  #13   Report Post  
Posted to microsoft.public.excel.misc
Domenic
 
Posts: n/a
Default how to extract decimal numbers from alphanumeric strings in Ex

Try adding...

+0

....at the end of the formula.

Hope this helps!

In article ,
Tim wrote:

The formula to remove the text from the boxes works a treat, but is there a
way that the results show as a number and not text so i can SUM the numbers
up?

Tim

  #14   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default how to extract decimal numbers from alphanumeric strings in Ex

This formula, with the cell formatted as general, did result in 16.5. In
another =e2*2 gave 33. Please explain.
=LEFT(D2,FIND("m",D2)-1)&TEXT(MID(D2,FIND(" ",D2),FIND("s",D2)-FIND("
",D2))/60,".#")

--
Don Guillett
SalesAid Software

"Tim" wrote in message
...
Yes everything works well, it gives me the results, but i wanted to be
greedy
and have them so i can sum them up.



"Don Guillett" wrote:

Did you try it before posting?

--
Don Guillett
SalesAid Software

"Tim" wrote in message
...
The formula to remove the text from the boxes works a treat, but is
there
a
way that the results show as a number and not text so i can SUM the
numbers
up?

Tim

"Don Guillett" wrote:

glad to help

--
Don Guillett
SalesAid Software

"Tim" wrote in message
...
Great Thanks!



"Don Guillett" wrote:


try
to get 16:30
=TEXT(LEFT(D2,FIND("m",D2)-1)&":"&MID(D2,FIND("
",D2),FIND("s",D2)-FIND("
",D2)),"hh:mm")
to get 16.5
=LEFT(D2,FIND("m",D2)-1)&TEXT(MID(D2,FIND("
",D2),FIND("s",D2)-FIND("
",D2))/60,".#")
--
Don Guillett
SalesAid Software

"Tim" wrote in message
...
how can i do this but with two numbers

Eg, 16m 30s

This is 16 minutes 30 seconds.

and if you know this, how can i then turn this to read a a
decimal,
ie,
change 16m 4s to read 16.5

Tim


"Domenic" wrote:

Try...

=LOOKUP(9.99999999999999E+307,--LEFT(A1,ROW(INDIRECT("1:"&LEN(A1)))))

....where A1 contains your alpha-numeric string.

Hope this helps!

In article ,
"Old Tone" <Old
wrote:

How do I extract decimal numbers from alphanumeric strings to
perform
calculations on the number, eg 25.1 km or 100 m.












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
My numbers format as a number with two decimal places. Tim Poulter Excel Discussion (Misc queries) 2 September 18th 05 01:42 AM
Formula without using numbers after decimal in the answer Mustang Excel Discussion (Misc queries) 5 September 16th 05 04:35 PM
Auto convert an alphanumeric string (CIS9638S) to numbers only? Gary L Brown Excel Worksheet Functions 1 September 7th 05 01:17 AM
Sorting alphanumeric numbers maurice.centner Excel Discussion (Misc queries) 2 May 6th 05 02:00 AM
extract numbers, convert to date gkaspen Excel Discussion (Misc queries) 7 March 2nd 05 02:31 AM


All times are GMT +1. The time now is 10:46 PM.

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"