Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Find a phrase in a string and convert it to a number

I´m able to find a specific phrase in a string. But when this is a number the
result is still a text cel. What is the worksheet function I can use to
convert the result into a number ? I don´t want to copy and past the value
(past special - values only), because I want to keep the formula instead of
use the value.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Find a phrase in a string and convert it to a number

Hi,

It would have helped to see some sample data and the formula used to extract
it.

say we have this string in A1
qwe1
This formula in B1 extracts the 1 and converts it to a number
=RIGHT(A1,1)*1

However, if you simply use =RIGHT(A1,1) you get the one as text but you can
still do math on it
=B1+8 would still return 9

Mike




"X-Ray" wrote:

I´m able to find a specific phrase in a string. But when this is a number the
result is still a text cel. What is the worksheet function I can use to
convert the result into a number ? I don´t want to copy and past the value
(past special - values only), because I want to keep the formula instead of
use the value.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Find a phrase in a string and convert it to a number

You can use the double unary minus (--), or you can multiply by 1, or
you can add zero to the result, or you can wrap the formula with
VALUE( ... )

Hope this helps.

Pete

On Sep 24, 10:02*am, X-Ray wrote:
Im able to find a specific phrase in a string. But when this is a number the
result is still a text cel. What is the worksheet function I can use to
convert the result into a number ? I dont want to copy and past the value
(past special - values only), because I want to keep the formula instead of
use the value.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Find a phrase in a string and convert it to a number

=VALUE( string_formula )

Regards,
Stefi

X-Ray ezt *rta:

I´m able to find a specific phrase in a string. But when this is a number the
result is still a text cel. What is the worksheet function I can use to
convert the result into a number ? I don´t want to copy and past the value
(past special - values only), because I want to keep the formula instead of
use the value.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Find a phrase in a string and convert it to a number

Calculations are possible, but when comparing, or vlookup, or use in Pivot´s
the nummeric and alfanumeric values are threated differently. So in in a
lookup I won´t find a numeric value when vlooking in textvalue´s.

"Mike H" wrote:

Hi,

It would have helped to see some sample data and the formula used to extract
it.

say we have this string in A1
qwe1
This formula in B1 extracts the 1 and converts it to a number
=RIGHT(A1,1)*1

However, if you simply use =RIGHT(A1,1) you get the one as text but you can
still do math on it
=B1+8 would still return 9

Mike




"X-Ray" wrote:

I´m able to find a specific phrase in a string. But when this is a number the
result is still a text cel. What is the worksheet function I can use to
convert the result into a number ? I don´t want to copy and past the value
(past special - values only), because I want to keep the formula instead of
use the value.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Find a phrase in a string and convert it to a number

On Wed, 24 Sep 2008 02:02:01 -0700, X-Ray
wrote:

Im able to find a specific phrase in a string. But when this is a number the
result is still a text cel. What is the worksheet function I can use to
convert the result into a number ? I dont want to copy and past the value
(past special - values only), because I want to keep the formula instead of
use the value.


It would have helped if you posted your formula, and the version of Excel you
are using, but, in general, something like:

=if(iserr(-(your_formula)),your_formula,--(your_formula))

will convert the result to a real number, if it can be, and leave it unchanged
if it cannot be.
--ron
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
convert string to number Jeff Klein Excel Worksheet Functions 4 November 1st 07 10:01 PM
convert a text string to a number kevcar40 Excel Discussion (Misc queries) 7 July 4th 07 03:58 PM
Convert a number to phrase Shahrun A Rahman Excel Discussion (Misc queries) 2 May 7th 07 12:46 AM
Convert a number to a name string Numbers to name string Excel Worksheet Functions 2 June 23rd 06 04:52 PM
convert string to number Christina Excel Worksheet Functions 3 November 16th 04 02:36 PM


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