• Evalute a Statement (Excel 2002/sp3)

    • This topic has 7 replies, 4 voices, and was last updated 18 years ago.
    Author
    Topic
    #415165

    I was just fooling around with the instructions from the latest “Office for Mere Mortals” as follows (for those that don’t receive it):
    EVALUATE A STATEMENT
    There are some hidden or undocumented functions you can use in Excel. For example, an old Excel 4.0 macro function called Evaluate can be used to calculate the result of a text expression such as 365*43 entered in an Excel cell. Information about the function is difficult to find but here, in a nutshell, is how to use it.

    Begin by typing the text expression in a cell, for example into B1 you can type 365*43 and, in cell A1 type a label such as Expression to evaluate: so you know what is what. Now choose Insert, Name, Define and type the word answer in the Names in workbook area and in the Refers to area type =Evaluate($B$1) and click Add and then Ok. Now, in the cell where you want the answer to the calculation 365 * 43 to appear type =answer.

    You can replace the expression in cell B1 with any valid expression of the type that Excel can calculate such as 9^3 to find the result of 9 cubed.

    Why use this? For starters it is handy for teaching purposes – you can display a cell formula as text in one cell and the result in a neighboring cell knowing that the display text will always match the result. _______

    Anyhow, I can’t make it work – what am I missing?

    Viewing 0 reply threads
    Author
    Replies
    • #925183

      I don’t know if the attached worksheet will work for you – the macro function might not be translated correctly. If you get #NAME, click in an empty cell, select Insert | Name | Define…, click on Answer and edit the definition so that it reads

      =evaluate($B$1)

      then click Add and OK.

      • #925185

        Oh, of course I didn’t name the range properly. I thought there was something special about the word “Answer”.

        Thanks

        • #925240

          I was able to make this work as described in the newsletter, but I was confused as to how the function could work when used in a range name, but not when typed directly into a cell. If I type 4+5 into A1 and =evaluate(A1) into B1, I get a dialog box that says “That function is not valid”. Are there other functions that only work when used in a range name? Maybe I’m not familiar enough with Excel4. I didn’t start using Excel until version 5.

    Viewing 0 reply threads
    Reply To: Evalute a Statement (Excel 2002/sp3)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: