# How to make a ratio win:total with only integers and least terms

So basically I am trying to find a way to show a simple ratio of wins vs total games.

for example:

• 2 wins on 5 games would give me a ratio of 2:5
• 5 wins on 15 games: 1:3
• 8 wins on 18 games: 4:9

As a nice to have, it would fun to allow half points for the first member, but I guess this would be too complicated:

• 7 wins on 10 games: 3.5:5

Thanks

-
To avoid decimal points, you can multiply by 10; 7 wins on 10 games: 35:50 – Jacob Jan Tuinstra Feb 22 '13 at 13:12

I see that you want to simplify the fraction (e.g. 5/15 => 1/3), but there's no standard function for that in Google Spreadsheets.

Some time ago I found this post, where a formula is mentioned:

``````=(A2*(10^(LEN(A2)-2)))/GCD(A2*(10^(LEN(A2)-2)) ;10^(LEN(A2)-2))& " / " & ( 10^(LEN(A2)-2)) /GCD(A2*(10^(LEN(A2)-2)) ;10^(LEN(A2)-2))
``````

where `A2` is wins divided by games. It does not grant your wish of half points, but you might be able to massage the formula into giving you that.

I set up an example spreadsheet using that formula here.

-
Wow totally a.w.e.s.o.m.e Much more complicated than what I expected. Thanks so much. – Guillaume Bois Feb 22 '13 at 15:46