General discussion

Locked

Magnitude of a numerical value

By alun.pincombe ·
Finding the magnitude of a numerical value regardless of sign. + or -?

So far I have
Num 1 Num 2 Magnitude
-2 1 =MAX(IF(Num_1<0,Num_1*-1,Num_1),(IF(Num_2<0,Num_2*-1,Num_2)))

Which does return 2 as the answer.
How can I keep the Sign as well so get -2 as the answer?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Software Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums