How to calculate the difference between two values and display the result with a + or - sign

Hi community! How can I calculate the difference between two values and display the result with a positive or negative sign depending on whether the difference is upward or downward?

For example, if I have two values: 5 and -2. I need the following result: -7.

And if I have: -5 and -2. I need the following result: 3.

Thank you so much!!

Answers

  • Carson Penticuff
    Carson Penticuff ✭✭✭✭✭✭
    edited 06/06/23

    I believe this will take care of it. Just subtract your first number from the second.

    =[column 2]@row - [column 1]@row

    -2 - 5 = -7

    -2 - (-5) = 3

  • Im new to Samrtsheet but trying to do a basic house build budget. For each item row line item, I want 3 columns

    1. Budget value $ 2. Actual Cost $ 3.The difference plus or minus between the 1 and 2 shows me whether I am over budget or under budget. I am struggling to make the formula to get for Collum 3 . I have looked around but can't find one that will give it to me correctly. Very glad of any help 🙂 Kind Regards Eddie
  • Hi @Eddie Raikes

    As long as the data in columns 1 and 2 are set as values (numbers) then you should simply be able to subtract one from the other! 🙂

    Here's more information: Create and edit formulas in Smartsheet

    If this hasn't helped, please post screen captures of your sheet (blocking out sensitive data) and identify how your data is being entered into columns 1 and 2.

    Thanks!

    Genevieve

    Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.

  • Hello Genevieve

    Thanks for the link, thats exactly what I needed😊

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!