google sheets formula for calculating difference between values

0

I’m not even sure how to ask this, but it’s a question for someone who understands Google sheets formulas and maths!

I’m looking for a formula that will look at the values contained in three cells, and return the difference between the two values furthest apart. An added complication possibly is that some of the values will be minus figures. So for example:

1, 4, -6 = 10 //
2, 5, 8 = 6 //
-3, -9, 5 = 14 //

The figures will be more complex than the above but hopefully it gives you an idea. I wonder whether this can be done, and if so, does anyone know how?

Thank you for any help.

siac

Posted 2016-12-11T15:33:46.393

Reputation: 1

Welcome to Super User! Please read the tags before posting your question. – DavidPostill – 2016-12-11T16:19:07.670

Answers

1

If we are talking about 3 input cells: C3, D3, E3 we may get maximal range between them by getting maximal absolute value between pairs C3-D3, D3-E3 and C3-E3.

Here is formula: =MAX(abs(C$3-D$3), abs(D$3-E$3), abs(C$3-E$3))

See example: https://docs.google.com/spreadsheets/d/1Dw8zQKdMqeEU2OPP7EW_8Ie2srJ7TYJP5VQPTxamECA/edit?usp=sharing

Jurosh

Posted 2016-12-11T15:33:46.393

Reputation: 189