A Different way to Calculate Ratios using GDC & or MIN ?

Status
Not open for further replies.

StrawberryDreams

Board Regular
Joined
Mar 26, 2022
Messages
79
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
  3. Mobile
Simply put , what is the best formula to write Ratios for both 2 numbers, and 3 or more numbers ?

I've tried using GDC and MIN on both 2 and 3 number ratios and both formulas can be broken. They either don't properly get the lowest number as 1, or they show DIV/O errors, or GDC panics when using decimals. Is there a bullet proof formula so I can get any possibility to work ? I know my formula can be improved.

Is there a better way to do what I want ? You can see in the example the yellow cells are the "problem cells."


Basic data calculator test 9.4.xlsm
ABCDEFG
1Value 1Value 2Value 3Ratio using GDC ( Value 1 & 2 )Ratio using MIN ( Value 1 & 2 )Ratio formula for three or more numbers ? GCDRatio formula for three or more numbers ? Using MIN
292329 : 231 : 2.569 : 23 : 24.5 : 11.5 : 1
3239223 : 92.56 : 123 : 9 : 211.5 : 4.5 : 1
427329 : 19 : 127 : 3 : 213.5 : 1.5 : 1
532791 : 91 : 91 : 9 : 31 : 9 : 3
640.521 : 0.1258 : 12 : 0.25 : 18 : 1 : 4
70.5400.125 : 11 : 80.125 : 1 : 0#DIV/0!
80.00890.230.1234#DIV/0!1 : 25.84#DIV/0!1 : 25.84 : 13.87
9000Nil#DIV/0!Nil#DIV/0!
10001Nil#DIV/0!Nil#DIV/0!
110100 : 1#DIV/0!0 : 1 : 0#DIV/0!
121001 : 0#DIV/0!1 : 0#DIV/0!
131011 : 0#DIV/0!1 : 0#DIV/0!
140110 : 1#DIV/0!0 : 1 : 1#DIV/0!
Sheet1
Cell Formulas
RangeFormula
D2:D14D2=IF(B2=0,IF(A2=0,"Nil",A2&" : "&0),A2/GCD(A2:B2)&" : "&B2/GCD(A2:B2))
E2:E14E2=ROUND(A2/MIN(A2,B2),2) & " : " & ROUND(B2/MIN(A2,B2),2)
F2:F14F2=IF(B2=0,IF(A2=0,"Nil",A2&" : "&0),A2/GCD(A2:C2)&" : "&B2/GCD(A2:C2)&" : "&C2/GCD(A2:C2))
G2:G14G2=ROUND(A2/MIN(A2,B2,C2),2) & " : " & ROUND(B2/MIN(A2,B2,C2),2) & " : " & ROUND(C2/MIN(A2,B2,C2),2)
 
Last edited:

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Duplicate to: A Different way to Calculate Ratios using GDC & or MIN ?

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.

In relation to your question here, I have closed this thread so please continue in the linked thread. If you do not receive a response, you can "bump" it by replying to it yourself, though we advise you to wait 24 hours before doing so, and not to bump a thread more than once a day.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,931
Messages
6,175,465
Members
452,646
Latest member
tudou

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top