ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel - treat pairs of figures differently according to values (https://www.excelbanter.com/excel-worksheet-functions/25596-excel-treat-pairs-figures-differently-according-values.html)

Alistair

Excel - treat pairs of figures differently according to values
 
I want to use Excel to evaluate the results of a psychometric test.
The test produces pairs of figures.
Each figure can be positive or negative

If both are positive or both are negative I want the absolute difference

If one is positive and the other negative I want to sum them
If the first is positive and the second negative then I want to maket he
figure produced above positive
If the first is negative and the second positive I want to make the figure
produced above negtive

Any ideas?

bj

try
=if(Abs(A1)+Abs(B1)=Abs(A1+B1),Abs(A1-B1),if(A1<B1,-1,1)*Abs(A1+B1))

where your first number is is A1 and the second in B1

"Alistair" wrote:

I want to use Excel to evaluate the results of a psychometric test.
The test produces pairs of figures.
Each figure can be positive or negative

If both are positive or both are negative I want the absolute difference

If one is positive and the other negative I want to sum them
If the first is positive and the second negative then I want to maket he
figure produced above positive
If the first is negative and the second positive I want to make the figure
produced above negtive

Any ideas?



All times are GMT +1. The time now is 10:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com