
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calcular diferencia con signos
Buenos días y gracias por anticipado.
Tengo 2 columnas con valores y quiero generar una 3 columna como resultado de la resta de la col(1) - col(2) y si directamente genero esa función, como quiero tener en cuenta los signos no puedo hacerlo, es decir,
col(1) = +4.51
col(2)= -4.87
Resultado debería ser -0.36, no +9.38
Alguien me ayuda....

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using Google Translate to interpret your issue, so excuse any mistakes I make:
The 3rd column would just be:
Col(1) + Col(2)
In case Col(2) is positive, it would be just added to Col(1).
In case Col(2) is negative, it would add a negative number, which would be the same as Col(2) substracted from Col(1)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No puedo usar un col(1) + col(2) porque si los dos son positivos no me genera la diferencia.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Then try:
If(Col(2)<0,Col(1)+Col(2),Col(1)-Col(2))
If Col(2) is negative, it'll add the negative value to Col(1), if it's positive, it'll substract it from Col(1).
