+ Reply to Thread
Results 1 to 9 of 9

cell text is an equation - use that equation to populate an answer in another cell

  1. #1
    Registered User
    Join Date
    11-07-2013
    Location
    Georgia
    MS-Off Ver
    Excel 2003
    Posts
    12

    cell text is an equation - use that equation to populate an answer in another cell

    Please help me!! I have worked for 2 days at work on this to no avail and I'm out of time and patience!!

    A1 is a cell that has to show an equation. B1 is the answer to the equation. How to I insert a formula into B1 so that when the equation is typed into A1 the answer is populated in B1?

    example: A1 has this equation typed out: 1000*26/12
    how do I get B1 to populate the answer to this ($2,166.67)?

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: cell text is an equation - use that equation to populate an answer in another cell

    You need VBA function for that..

    Right click a sheet's tab, select View Code
    Click Insert - Module
    Paste the following code
    Please Login or Register  to view this content.
    Then you can use a formula in B1
    =MyEval(A1)

  3. #3
    Registered User
    Join Date
    11-07-2013
    Location
    Georgia
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: cell text is an equation - use that equation to populate an answer in another cell

    Oh my goodness you are an angel!! Thank you, thank you, thank you!!!

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: cell text is an equation - use that equation to populate an answer in another cell

    You're welcome.

  5. #5
    Registered User
    Join Date
    11-07-2013
    Location
    Georgia
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: cell text is an equation - use that equation to populate an answer in another cell

    One more thing - when I save it, it told me I needed to change the file type to enable macros. So I did. But when I open it back up, the formula and module are still there, but when I type an equation in A1, B1 returns #NAME?. What do I do to fix it to where each time it's opened it works correctly? I will be distributing the "template" spreadsheet to others to use for many different files.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: cell text is an equation - use that equation to populate an answer in another cell

    Make sure you have macros enabled.
    File - Options - Trust Center - Trust Center Settings - Macro Settings.

    Also, you may have a security warning on the top when you open the file telling you that macros are disabled.

  7. #7
    Registered User
    Join Date
    11-07-2013
    Location
    Georgia
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: cell text is an equation - use that equation to populate an answer in another cell

    Genius!! Thank you again!

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: cell text is an equation - use that equation to populate an answer in another cell

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: cell text is an equation - use that equation to populate an answer in another cell

    You're welcome.

+ 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] Rounding Function referenced in another equation not yelding rounded answer
    By Momma L in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-01-2013, 11:52 PM
  2. Replies: 4
    Last Post: 02-02-2012, 10:11 PM
  3. Replies: 3
    Last Post: 03-06-2011, 01:38 PM
  4. Equation to shift partial text to next cell
    By robmaster7 in forum Excel General
    Replies: 2
    Last Post: 04-03-2008, 06:31 PM
  5. [SOLVED] I want brackets around my math equation answer?
    By Ms Serene in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-25-2006, 05:50 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