Can Excell calculate Integer Ratios?

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
..
 
B

BrianB

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top