Can Excell calculate Integer Ratios?

  • Thread starter Thread starter dalightfoot
  • Start date Start date
D

dalightfoot

Fellow Excel Users:

How does one calulate ratios in Excel?

I want to calculate as follows:

If A>B then A:B=C eg. 2:1 =2

BUT if A<B A:B=-C eg. 1:2 =-2.

Thanks, David
..
 
There will be other forms of this formula, but this shows th
principle.
I have included the possibility of equality, which you can remove i
required (together with the final right bracket).
Not sure of your logic here, because usually ratio 1:2 gives .5.

However, as requested, with numbers in column A and B :-
=IF(A1=B1,1,IF(A1>B1,A1/B1,-B1/A1)
 
Back
Top