Hi Somkiat,
The parser built in Excel, judging from its behavior, is nothing like the callable EVAL of LISP/SCHEME. Moreover, it's not available to the users like EVAL is. SUBTOTAL behaves interestingly in a way similar to MAPC, APPLY, and the like in LISP/SCHEME.
Hope this helps.
Aladin
You could build a spreadsheet prog in LISP (Excel-like) and add to it or make available the EVAL of LISP in it, so that things such as the one you suggest can easily be done.
It is possible.
You do have access to an EVALUATE command function that can be setup to do exactly what you're asking for. Not entirely sure why you would want to do that but it is possible.
Suppose the following function exists in cell [A4]: = "="&A1&A2&A3&"(DataRange)"
Create a defined workbook name (lets call it "MySum") and use the following for the refers to piece: =EVALUATE(Sheet1!$A$4)
You'll then notice that if you input "=MySum" in any cell on your worksheet it will evaluate the formula in cell [A4].
Obviously, you could modify the named range to assemble the function itself and skip a step.
Regards,
AaronThe Excel Logic Page
I really thought that Somkiat was aware of EVALUATE and that he really wanted something more. His example made me think of LISP's EVAL.
Following up the example: In a spreadsheet in LISP, with EVAL one of its function we would have
=(EVAL ("&A1&B1&C1&"(DataRange)")) [ Don't take the syntax form too seriously]
with as result the computed sum/total of DataRange in the cell where this EVAL-formula is.
It was my belief Somkiat was after such a possibility. Whence my "A bold No".
Aladin
=====================
Thank very much to both of you. I was aware of EVALUATE from www.geocities.com/davemcritchie/excel/formula.htm#UseFormula
I am very lucky that both of you helped me though it is not possible.
Thanks again,
Somkiat
: Hi Somkiat,