Always positive number

lucky 83 -  
dobo69 Posted messages 1593 Registration date   Status Member Last intervention   -
Hello,
I would like Excel to automatically put the result of a subtraction in a cell...
The problem is that this result must always be positive. So I would like to know if it is possible for Excel to automatically detect the higher number compared to the other, thank you.
Configuration: Windows Vista Firefox 3.5.3

2 answers

  1. dobo69 Posted messages 1593 Registration date   Status Member Last intervention   835
     
    Good evening,

    otherwise, with the same starting example:

    =ABS(A-B1) returns the absolute value of the subtraction A1-B1, thus "removing" the negative sign

    Choose between our 2 proposals depending on what you are looking for!
    --
    If you don't need anything, just ask me.
    9
  2. Mike-31 Posted messages 18405 Registration date   Status Contributor Last intervention   5 147
     
    Hello,

    in A1 you have one value and in B1 another you can write

    =IF(A1-B1>=0;A1-B1;"Negative operation")

    when the subtraction A1-B1 is negative you will have the message Negative operation

    Best regards,
    Mike-31

    A problem without a solution is a poorly posed problem (Einstein)
    0