+ Reply to Thread
Results 1 to 9 of 9

Two cells put into formula??

  1. #1
    Registered User
    Join Date
    04-07-2009
    Location
    Kildare, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    10

    Two cells put into formula??

    I have two cells "n" and "m" which I want to place into the following formula

    1-n/(n+m)

    How do I do this to retun the anser in another cell?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Two cells put into formula??

    Formulas only return values to the cells in which they appear.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Two cells put into formula??

    if "n" refers to cell A1
    and "m" refers to cell B1
    Then in, say C1:

    =1-(A1/(A1+B1))

    I assume you want the order of operation to be
    Add A1+B1, then divide A1 by the result, then 1-result of divison.

    Otherwise, your original formula
    =1-A1/(A1+B1)

  4. #4
    Registered User
    Join Date
    04-07-2009
    Location
    Kildare, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Two cells put into formula??

    So its not possible to run the formula??

  5. #5
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Two cells put into formula??

    You have to use cell references in formulas.
    If you want letters to stand for a cell reference, then name the cell.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Two cells put into formula??

    Quote Originally Posted by Palmetto View Post
    Then in, say C1:

    =1-(A1/(A1+B1))

    I assume you want the order of operation to be Add A1+B1, then divide A1 by the result, then 1-result of divison.

    Otherwise, your original formula

    =1-A1/(A1+B1)
    Both formulas give the same result; multiplication and division have higher precedence that addition/subtraction.

  7. #7
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Two cells put into formula??

    Doh! I know that. Who can forget Please Excuse My Dear Aunt Sally (PEMDAS)

  8. #8
    Registered User
    Join Date
    04-07-2009
    Location
    Kildare, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Two cells put into formula??

    Thanks for all the help! Problem solved

  9. #9
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Two cells put into formula??

    Please post your solution so that others finding this thread will have an answer. Also, don't forget to mark your thread as solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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