Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default equation as text string and its numeric result

How can I type an equation in one cell as a text string eg. "2+3+(5+6)*6"
and get its result in the other one?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default equation as text string and its numeric result

Do a search of the newsgroups looking for Eval - you can define a User-
defined Function making use of Evaluate to do this.

Hope this helps.

Pete

On May 4, 11:01 am, patryk wrote:
How can I type an equation in one cell as a text string eg. "2+3+(5+6)*6"
and get its result in the other one?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default equation as text string and its numeric result

Try this tiny UDF:

Function value_of(r As Range) As Variant
value_of = Evaluate("=" & r.Value)
End Function

--
Gary''s Student - gsnu200718
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
Remove Numeric from a Text String - Help? Bob Phillips Excel Discussion (Misc queries) 9 September 27th 06 09:25 AM
Extracting Numeric Data from a Delimited Text String [email protected] Excel Worksheet Functions 5 February 10th 06 10:29 PM
Extrapolate numeric values from text string Henrik Excel Worksheet Functions 4 November 3rd 05 06:25 PM
Find first numeric value in text string Rbp9ad Excel Worksheet Functions 4 October 15th 05 02:01 AM
Equation in text string? hoising8 Excel Discussion (Misc queries) 3 July 28th 05 08:23 PM


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