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.

## Best Answer

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