+ Reply to Thread
Results 1 to 2 of 2

Embedding a formula into a cell

  1. #1
    Registered User
    Join Date
    08-30-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    1

    Angry Embedding a formula into a cell

    Okay, So here is goes.

    I want to take two cells that calculate power in two different Units. Say A1 is measurements in watts, A2 is measurements in Amps.

    I want to be able to enter a value in either cell and have the other cell display its value in its perspective unit.

    A1 has a function of =IF(A2>0,(A2*120),0)
    A2 has a function of =IF(A1>0,(A1/120),0)

    I know this a circular reference and is easily solved.....

    This is the part I can't get. I want to embed these two functions in the cells so that I can enter a value in one cell and the other cell will display the result. But, (1) if I delete the value, both cells will return to zero, -or- (2)If I enter a value into the other cell it will automatically change the other cell back to the embedded function.

    Make any sense? Please help.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    Re: Embedding a formula into a cell

    Here is a short VBA solution. If both cells are empty, place a value in A2, put your cursor in A1 and run the macro.
    Do the opposite for the other solution.

    Please Login or Register  to view this content.
    You could link this to a command button.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. embedding a formula
    By stephen1000 in forum Excel General
    Replies: 5
    Last Post: 03-10-2009, 08:26 AM
  2. embedding tab name variable into a formula?
    By keilamym in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-12-2009, 02:02 PM
  3. embedding a formula in IF statements
    By davidz1212 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-20-2008, 09:06 AM
  4. [SOLVED] Embedding a macro within a formula
    By rjhutch in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-08-2006, 08:35 PM
  5. Embedding a formula
    By sixfivebeastman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-08-2005, 03:48 PM

Tags for this Thread

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