Excel provides no direct way to display the ratio between two values. For example, assume cell A1 contains 3, and cell B1 contains 24. The ratio between these two values is 1:8.

Following is a formula, contributed by Douglas J. Roach, that displays the ratio between the values in cells A1 and B1:

=(LEFT(TEXT(A1/B1,"####/####"),FIND("/",TEXT(A1/B1,"####/####"))-1)&":"
&RIGHT(TEXT(A1/B1,"####/####"),LEN(TEXT(A1/B1,"####/####"))
-FIND("/",TEXT(A1/B1,"####/####"))))

The formula automatically reduces the "fraction" to the simplest form, and it allows up to four characters on either side of the colon.

Jerry Meng pointed out a much simpler formula that produces the same result, but does not have the four-character limit:

=A1/GCD(A1,B1)&":"&B1/GCD(A1,B1)

Jerry's formula uses the GCD function, which is available only when the Analysis Toolpak Add-In is installed.

Note: Be aware that the result of these formulas is actually a time value, not a fractional value. For example, the ratio of 1:8 is not the same as 1/8. Rather, it is represented internally as 1:08 am.

0 comments