Excel - simple formula

Posted on 2011-10-14
Last Modified: 2012-05-12
Hi EE-r's - It's late and I just cannot get this.

Simply need a formula that will give answer in all cases as follows:
Have 3 columns
col 1 is an amount positive, neg or zero
col 2 is the same
col 3 needs to be the difference between the two stated with the correct sign
I can get it to work mostly but when pos and neg numbers flip flop it gets cranky.
Question by:COBOLforever
    LVL 50

    Accepted Solution


    The difference between the two can be calculated in two ways, depending on how you want to display the difference. For example:

    one      two      result A      result B
    -1        1            -2                     2
    1        -2             3                   -3
    -2        2            -4                    4

    Result A is calculated with

    Result B is calculated with

    cheers, teylyn

    Author Closing Comment

    Crazy how difficult I was making it. Thanks much,.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Suggested Solutions

    How to Win a Jar of Candy Corn: A Scientific Approach! I love mathematics. If you love mathematics also, you may enjoy this tip on how to use math to win your own jar of candy corn and to impress your friends. As I said, I love math, but I gu…
    Have you ever thought of installing a power system that generates solar electricity to power your house? Some may say yes, while others may tell me no. But have you noticed that people around you are now considering installing such systems in their …
    Viewers will learn how to share Excel data with others from desktop Excel, as well as Excel Online via OneDrive, and embed an Excel file on a website.
    Video by: Zack
    Viewers will learn the basics of using Excel Tables, the benefits found with them, and some pitfalls.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now