Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Convert Text to Formula

I have a cell with the text = sum(A10:A30) as the result of a formula. This
is because it is constructed by other formulae using values given by the user.

How do I evaluate this text as if it were a formula?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Convert Text to Formula

Hi,

Post the formula that gave you this string as an output and it should be
possible to modify it it get the result you want.

Mike

"Mjones14" wrote:

I have a cell with the text = sum(A10:A30) as the result of a formula. This
is because it is constructed by other formulae using values given by the user.

How do I evaluate this text as if it were a formula?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Convert Text to Formula

Should calculate and display the sum. Try formatting the cell to General and
edit (F2) and enter.

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


"Mjones14" wrote:

I have a cell with the text = sum(A10:A30) as the result of a formula. This
is because it is constructed by other formulae using values given by the user.

How do I evaluate this text as if it were a formula?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Convert Text to Formula

You'll need a user defined function.

Option Explicit
Function Eval(myStr As String) As Variant
Application.Volatile True
Eval = Application.Caller.Parent.Evaluate(myStr)
End Function


If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

Short course:

Open your workbook.
Hit alt-f11 to get to the VBE (where macros/UDF's live)
hit ctrl-R to view the project explorer
Find your workbook.
should look like: VBAProject (yourfilename.xls)

right click on the project name
Insert, then Module
You should see the code window pop up on the right hand side

Paste the code in there.

Now go back to excel.
Into a test cell and type:
=eval(a1)




Mjones14 wrote:

I have a cell with the text = sum(A10:A30) as the result of a formula. This
is because it is constructed by other formulae using values given by the user.

How do I evaluate this text as if it were a formula?


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Convert Text to Formula

Do you want to replace the original formula and convert the TEXT formula to
a working formula?

If so:

Select the cell(s) of interest
Goto EditCopy
Then, EditPaste SpecialValuesOK

Then, EditReplace
Find what: =
Replace with: =
Replace all

--
Biff
Microsoft Excel MVP


"Mjones14" wrote in message
...
I have a cell with the text = sum(A10:A30) as the result of a formula.
This
is because it is constructed by other formulae using values given by the
user.

How do I evaluate this text as if it were a formula?



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 Text to a Formula dhstein Excel Discussion (Misc queries) 5 October 6th 09 02:08 PM
How to convert formula to text odd Excel Worksheet Functions 2 December 15th 06 04:30 PM
convert text into Formula Ananth Excel Discussion (Misc queries) 3 September 18th 06 08:54 AM
how to convert a formula into text in order to display the formula Claudio Hartzstein Excel Discussion (Misc queries) 2 July 13th 06 09:58 AM
convert text to a value to be used in a formula otto Excel Worksheet Functions 1 May 23rd 05 07:40 PM


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