Ratio Rounding

A

Andy Roberts

I have used the following formula to calculate a ratio between two number.

=IF(J31=0,"",J31/GCD(J31:K31)&":"&K31/GCD(J31:K31))

How do I have the result rounded to 1 decimal place? I currently get
2:0.4444444444. I want to see 2:0.4

Andy
Excel 2007
 
R

RagDyeR

Try this:

=IF(J31=0,"",J31/GCD(J31:K31)&":"&ROUND(K31/GCD(J31:K31),1))
--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================


I have used the following formula to calculate a ratio between two number.

=IF(J31=0,"",J31/GCD(J31:K31)&":"&K31/GCD(J31:K31))

How do I have the result rounded to 1 decimal place? I currently get
2:0.4444444444. I want to see 2:0.4

Andy
Excel 2007
 
A

Andy Roberts

Just one minor point

If I use =IF(J31=0,"",J31/GCD(J31:K31)&":"&ROUND(K31/GCD(J31:K31),1)) the
result is to 2 decimal places
If I use =IF(J31=0,"",J31/GCD(J31:K31)&":"&ROUND(K31/GCD(J31:K31),0)) the
result is to 0 decimal places

How do I get it to one decimal place?

Andy
 
R

RagDyeR

The last argument of the Round() function dictates the number of decimal
places.

The formula I suggested will only give you a *single* decimal place.

What numbers do you have in J31 and K31?

--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

Just one minor point

If I use =IF(J31=0,"",J31/GCD(J31:K31)&":"&ROUND(K31/GCD(J31:K31),1)) the
result is to 2 decimal places
If I use =IF(J31=0,"",J31/GCD(J31:K31)&":"&ROUND(K31/GCD(J31:K31),0)) the
result is to 0 decimal places

How do I get it to one decimal place?

Andy
 

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