+ Reply to Thread
Results 1 to 13 of 13

Formula shows as text in cell entered and result shows in another cell

  1. #1
    Registered User
    Join Date
    03-29-2009
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2016
    Posts
    48

    Formula shows as text in cell entered and result shows in another cell

    I want to automate a worksheet so that I can enter a simple formula in a cell and have it show the formula as I entered it but also show the results in an adjacent cell.

    For example:
    In cell E10 I enter something like 16*(3*3), or 16*9, or =16*9 and cell H10 displays "144" (the answer to the equation entered in E10).

    I have attached an Excel 2007 "ExcelTest.xlsx" worksheet showing some of my failed attempts.

    I use data validation in column "B" to choose appropriate formula style (ohm's law), this in turn auto-fills appropriate labels for unknown variable in column "D" & "G" (E, I, R, P) & result in column "I" (V, A, Ohms, W) as well as conditionally formats results box in column "H" with color to indicate result category (V=purple, A=blue, Ohms=green, W=yellow). It is all working except I can't get the results box in column "H" to display result from formula entered in column "E".

    I prefer to use formula as I haven't done VBA and it is still a mystery for me and I am short on time to learn it at the moment.
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Formula shows as text in cell entered and result shows in another cell

    You've uploaded an .xlsx file, yet your profile shows Excel 2000. If there is any chance your profile is incomplete and actually includes Excel 2013 there is a new function FORMULATEXT. It would do what you describe.
    Dave

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Formula shows as text in cell entered and result shows in another cell

    Ha this is simple.

    I read how to do this yesterday.

    you need to use the evaluate function from excel 4.0 in a defined name.

    use the name manager to define the new name "result"
    in the refers to field enter
    Please Login or Register  to view this content.
    Then

    Enter
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    in H5 and fill down

    thats it.


    Valid formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    or
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mehmetcik; 11-15-2015 at 07:41 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Registered User
    Join Date
    03-29-2009
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Formula shows as text in cell entered and result shows in another cell

    Ok, awesome mehmetcik! It works on the test file but I am still cloud as to why and how to reproduce your results.

    I tried double-clicking on cell in column "H" to see its contents & associated cells, after moving away from cell it displayed "#NAME" instead of desired result even though it still contained name "=result" it no longer worked and I can't seem to make it work again unless I reopen the worksheet - why?

    I then located the Name Manager (of which I am previously unfamiliar) and copied the function "=EVALUATE(Sheet1!$E5)" to a cell. When I pressed ENTER I got the error "That function is not valid." If I escape out of this it only displays the text "=EVALUATE(Sheet1!$E9)"

    The function EVALUATE does not seem to exist in the function list, how would one find it and know what it does? Is there another list of functions just for the Name Manager?

    Thank you so far and I appreciate any more light you could shed on this.

  5. #5
    Registered User
    Join Date
    03-29-2009
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Formula shows as text in cell entered and result shows in another cell

    I work on multiple computers with differing vintages of software so it varies from time to time. I am currently using office 2007.

  6. #6
    Registered User
    Join Date
    03-29-2009
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Formula shows as text in cell entered and result shows in another cell

    When I tried replicating your work on my spreadsheet and type "=result()" in the results cell I get "That function is not valid". However when I looked at the sample worksheet it had "=result" without the "()" so I tried that and it just copies the contents of the equation cell into the results cell - same as if I typed "=E5" or "=(E5)". I must be missing something...

  7. #7
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Formula shows as text in cell entered and result shows in another cell


  8. #8
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Formula shows as text in cell entered and result shows in another cell

    http://www.ozgrid.com/News/excel-eva...ormula-VBA.htm

    Read that link.

    Evaluate and a few more functions are left over from excel 4 and only work in name manager.

    Post some more examples tomorrow and we can work through them.

  9. #9
    Registered User
    Join Date
    03-29-2009
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Formula shows as text in cell entered and result shows in another cell

    Thanks mehmetcik,
    I've been sleuthing on my own and found a fairly good explanation of how EVALUATE works (and doesn't work - outside of a Named Range) at:
    http://www.myonlinetraininghub.com/e...luate-function

    It said this was an old macro tool that was still embedded in Excel 2010 and stated the workbook would need to be saved as a macro-enabled workbook or .xlsm. I tried this and it still did not work. I wonder if my "Home & Student" edition of MS2007 does not support this function.

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Formula shows as text in cell entered and result shows in another cell

    @r.coon

    I have "Home & Studet" 2013 and it works on mine. So that seems unlikely.

    Make wherever you first enter =result the active cell when you define "result" in Name Manager, and be certain that the cell referred to in =EVALUATE(<whatever cell>) is the first one in the reference column. Once that's done try it again. Since you are new to Name Manager you might not be aware that it is particular (sometimes aggravatingly so) about relative positions as well as relative / absolute cell addresses upon creation.
    Last edited by FlameRetired; 11-15-2015 at 11:52 PM.

  11. #11
    Registered User
    Join Date
    03-29-2009
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Formula shows as text in cell entered and result shows in another cell

    @FlameRetired

    I tried this multiple times (and multiple ways) w/o success. I did however run across a simple UDF code at:

    http://superuser.com/questions/25335...were-a-formula

    that looks like this:

    Function ev(r As Range) As Variant
    ev = Evaluate(r.Value)
    End Function

    I entered this as a UDF using "Alt-F11", changed "ev" to "EVALUATE" and saved it as a project. This function now shows up in function list (but of course it doesn't work in a cell, only if used from Name Manager which doesn't allow you choose from the function list...very handy MS).

    It works as everyone described now, yea! But it seems like there should have been an easier way than spending my entire afternoon & evening learning a whole new tool I will rarely use.

    If anyone knows an easier way I'd love to hear it.

  12. #12
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Formula shows as text in cell entered and result shows in another cell

    Glad you found something that works. Sorry, though. I don't know of any easier way.

  13. #13
    Registered User
    Join Date
    03-29-2009
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Formula shows as text in cell entered and result shows in another cell

    Thank you all for your kind advice and enough clues to help me figure it out. Why it didn't work outright as shown (as well as several places I found online) I don't know. I see no more suggestions for this issue after 24hrs so I will mark it as solved. Hopefully there are enough clues here to help the next person trying to do this.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Function Arguments window shows result, cell shows a 0
    By fluffsmckenzie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-09-2013, 05:48 PM
  2. when text is entered on a cell formula shows #VALUE!
    By pjwallis in forum Excel General
    Replies: 11
    Last Post: 09-09-2011, 12:05 PM
  3. [SOLVED] Cell shows only formula, no result
    By alexrm in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  4. Cell shows only formula, no result
    By alexrm in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  5. Cell shows only formula, no result
    By Jim Thomlinson in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 07:05 AM
  6. Cell shows only formula, no result
    By Jim Thomlinson in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  7. Cell shows only formula, no result
    By alexrm in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  8. [SOLVED] Cell shows only formula, no result
    By alexrm in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1