Help with mathematical operation / opereacion matematica - Forum

Forum Navigation
You need to log in to create posts and topics.

Help with mathematical operation / opereacion matematica

@vadim

Hello people... let's see if you can help me solve this little problem...
In a mathematical operation where I express that a person has a debt balance of 100 and pays me 120, the result will be -20
That is, the variable [result] will have a value of -20

[balance] - [payment] = [result]
100 120 - 20

How could I achieve that if the result variable contains the sign - by prefixing the result, it omits the negative sign, showing only the value so that in this case I can add the legend CREDITOR

Greetings

 

Hola gente... a ver si me pueden ayudar a resolver este pequeño problema...
En una operacion matematica donde expreso que una persona tiene un saldo deudor de 100 y me paga 120 el resultado sera -20
es decir la variable [resultado] tendra un valor de -20

[saldo] - [pago] = [resultado]
100 120 - 20

Como podria lograr que si la variable resultado contiene el signo - anteponiendo el resultado omita el signo negativo mostrando solo el valor para que yo pueda en este caso agregar la leyenda ACREEDOR

Saludos

 

StrReplace "[resultado]" "-" "" "[resultado]" ""

Vadim has reacted to this post.
Vadim
Math "[balance] - [payment]" "0" "[result]"

If "[result]" "<" "0"
    Math "[result]*(-1)" "0" "[CREDITOR]"
Else
    .....
EndIf

 

luishp and Vadim have reacted to this post.
luishpVadim

@alangonzalez91@mishem

 

Super THANKS!!!!

Best Regards

alangonzalez91 has reacted to this post.
alangonzalez91