Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Depending of the data in the spreadsheet, I need to change the formula in a
cell. I'm trying to find an excel function that will evaluate the resulting text in a cell sort of like the INDIRECT() function does but one that will work on formulas. I'm trying to use a formula in a cell to create a text string that I then want evaluated. I.e.; a formula in cell A1 creates a text string with a formula "=B2*C2". I'm looking for a function that will evaluate that string. I thought this function was in excel but I can't find it. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this UDF (User Defined function). From workbook launch VBE using Alt+F11.
From menu Insert a Module and paste the below function.Close and get back to workbook and try the below formula. In cellD2 you have the text =B2*C2 In cell D3 you try the formula =eval(D2) Function Eval(strFormula As String) As Variant Eval = Evaluate(strFormula) End Function If this post helps click Yes --------------- Jacob Skaria "Dave" wrote: Depending of the data in the spreadsheet, I need to change the formula in a cell. I'm trying to find an excel function that will evaluate the resulting text in a cell sort of like the INDIRECT() function does but one that will work on formulas. I'm trying to use a formula in a cell to create a text string that I then want evaluated. I.e.; a formula in cell A1 creates a text string with a formula "=B2*C2". I'm looking for a function that will evaluate that string. I thought this function was in excel but I can't find it. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
Click on cell A1 and then go to Insert Name Define. Give it a name called array. In the formula, enter =EVALUATE(Sheet1!$A$1). in A2, enter =sum(array). Hope this helps. -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "Dave" wrote in message ... Depending of the data in the spreadsheet, I need to change the formula in a cell. I'm trying to find an excel function that will evaluate the resulting text in a cell sort of like the INDIRECT() function does but one that will work on formulas. I'm trying to use a formula in a cell to create a text string that I then want evaluated. I.e.; a formula in cell A1 creates a text string with a formula "=B2*C2". I'm looking for a function that will evaluate that string. I thought this function was in excel but I can't find it. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Function to evaluate function as string | Excel Worksheet Functions | |||
Evaluate text string as a function | Excel Discussion (Misc queries) | |||
IF function - need to evaluate cell content in 2 separate files-#N | Excel Worksheet Functions | |||
Evaluate string as a formula | Excel Worksheet Functions | |||
how to evaluate the content of a string as if it was a formula | Excel Discussion (Misc queries) |