A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Formula to extract number values only



 
 
Thread Tools Display Modes
  #1  
Old November 20th, 2009, 09:39 PM posted to microsoft.public.excel.misc
april
external usenet poster
 
Posts: 210
Default Formula to extract number values only

Hi,
I can't seem to remember how to use a formula to extract numbers only. For
example, I would like to take a create a formula to pull only "3.5" for a
cell that containts "Sum: 3.5"...
  #2  
Old November 20th, 2009, 09:51 PM posted to microsoft.public.excel.misc
Luke M
external usenet poster
 
Posts: 2,672
Default Formula to extract number values only

In your example, you could use:
=--(RIGHT(A2,3))

If your cells follow a pattern of:
Text(space)number

You can use:
=--(RIGHT(A2,LEN(A2)-FIND(" ",A2)))
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"April" wrote:

Hi,
I can't seem to remember how to use a formula to extract numbers only. For
example, I would like to take a create a formula to pull only "3.5" for a
cell that containts "Sum: 3.5"...

  #3  
Old November 20th, 2009, 09:53 PM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
Default Formula to extract number values only

April,

you only give one example so it's a bit hit annd miss I'm afraid but how
about this

=LOOKUP(6.022*10^23,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0 123456789")),ROW($1:$100))))

all in one line of course

Mike

"April" wrote:

Hi,
I can't seem to remember how to use a formula to extract numbers only. For
example, I would like to take a create a formula to pull only "3.5" for a
cell that containts "Sum: 3.5"...

  #4  
Old November 20th, 2009, 09:57 PM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default Formula to extract number values only

cell that containts "Sum: 3.5"...

If the number is *always* after the space:

A1 = Sum: 3.5

=--MID(A1,FIND(" ",A1),15)

--
Biff
Microsoft Excel MVP


"April" wrote in message
...
Hi,
I can't seem to remember how to use a formula to extract numbers only. For
example, I would like to take a create a formula to pull only "3.5" for a
cell that containts "Sum: 3.5"...



  #5  
Old November 21st, 2009, 12:38 AM posted to microsoft.public.excel.misc
Ron Rosenfeld
external usenet poster
 
Posts: 3,719
Default Formula to extract number values only

On Fri, 20 Nov 2009 13:39:01 -0800, April
wrote:

Hi,
I can't seem to remember how to use a formula to extract numbers only. For
example, I would like to take a create a formula to pull only "3.5" for a
cell that containts "Sum: 3.5"...


If the number is always at the end of the string, then:

=--MID(A1,MIN(FIND({1,2,3,4,5,6,7,8,9,0},A1&"1,2,3,4, 5,6,7,8,9,0")),15)

--ron
  #6  
Old November 21st, 2009, 03:40 AM posted to microsoft.public.excel.misc
Rick Rothstein[_2_]
external usenet poster
 
Posts: 2,013
Default Formula to extract number values only

I can't seem to remember how to use a formula to extract numbers only. For
example, I would like to take a create a formula to pull only "3.5" for a
cell that containts "Sum: 3.5"...


If the number is always at the end of the string, then:

=--MID(A1,MIN(FIND({1,2,3,4,5,6,7,8,9,0},A1&"1,2,3,4, 5,6,7,8,9,0")),15)


I think that will fail if there are other numbers appearing earlier in the
string. Here is a method to pull the number at the end no matter what is in
front of it...

=LOOKUP(9.9E+307,--RIGHT(A1,ROW($1:$99)))

--
Rick (MVP - Excel)

  #7  
Old November 21st, 2009, 12:12 PM posted to microsoft.public.excel.misc
Ron Rosenfeld
external usenet poster
 
Posts: 3,719
Default Formula to extract number values only

On Fri, 20 Nov 2009 22:40:53 -0500, "Rick Rothstein"
wrote:

I think that will fail if there are other numbers appearing earlier in the
string.


It will. That's why I wrote:

If the number is always at the end of the string, then:


--ron
  #8  
Old November 21st, 2009, 12:20 PM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Formula to extract number values only

Another one
=--MID(A1,FIND(":",A1)+1,9)


If this post helps click Yes
---------------
Jacob Skaria


"April" wrote:

Hi,
I can't seem to remember how to use a formula to extract numbers only. For
example, I would like to take a create a formula to pull only "3.5" for a
cell that containts "Sum: 3.5"...

  #9  
Old November 22nd, 2009, 04:27 AM posted to microsoft.public.excel.misc
Rick Rothstein[_2_]
external usenet poster
 
Posts: 2,013
Default Formula to extract number values only

Sorry, I misread what you meant by that... I thought you were referring to
the number that the OP was after, as per his example, being at the end of
the text no matter what what in front of it.

--
Rick (MVP - Excel)


"Ron Rosenfeld" wrote in message
...
On Fri, 20 Nov 2009 22:40:53 -0500, "Rick Rothstein"
wrote:

I think that will fail if there are other numbers appearing earlier in the
string.


It will. That's why I wrote:

If the number is always at the end of the string, then:


--ron


  #10  
Old November 22nd, 2009, 12:06 PM posted to microsoft.public.excel.misc
Ron Rosenfeld
external usenet poster
 
Posts: 3,719
Default Formula to extract number values only

On Sat, 21 Nov 2009 23:27:11 -0500, "Rick Rothstein"
wrote:

Sorry, I misread what you meant by that... I thought you were referring to
the number that the OP was after, as per his example, being at the end of
the text no matter what what in front of it.

--
Rick (MVP - Excel)


As we've both noted before, figuring out all the possible variants, given an
initial limited posting of examples, can be tough, and lead to initial
inappropriate responses.

For example, what if there could be multiple numbers, but only the last set of
numbers is wanted; but there could be text following.


--ron
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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