+ Reply to Thread
Results 1 to 5 of 5

how do I write this formula?

  1. #1
    Forum Contributor
    Join Date
    10-29-2004
    Posts
    291

    how do I write this formula?

    cell1+cell2<cell3 then (cell1+cell2) X 0.062
    cell1+cell2>cell3 then (cell3-cell1) X 0.062


    How would I write this formula?

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829
    IF(condition,value_if_true,value_if_false)

    =IF(cell1+cell2<cell3,(cell1+cell2)*.062,(cell3-cell1)*.062) Note that your problem statement doesn't specify what to do if cell1+cell2=cell3. I've put this condition in with the case where cell1+cell2>cell3. Adapt as needed.

  3. #3
    Forum Contributor
    Join Date
    10-29-2004
    Posts
    291
    I just realized that if cell1 is greater than cell3 then the results should be zero. How would I account for that?

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829
    Nest the above IF function inside of a another IF function
    =IF(cell1>cell3,0,IF(...)) Note that Excel is limited to 7 nested IF's, so if your decision tree has many more branches to it, you'll need to come up with another approach.

  5. #5
    Forum Contributor
    Join Date
    10-29-2004
    Posts
    291
    Thanks for your help!

+ 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