Formatting DIVIDE Results as Unsimplified Fractions in Google Sheets

google sheets

I'm dividing the value in one cell by a value in another cell. I want the final result to be in fraction form and not reduce to the smallest equivalent fraction.
I've figured out how to get the result of the =divide to format in fraction form (# ???/???).
However, I cannot find a way to keep Google Sheets from simplifying it.

For example:
=DIVIDE(O4,M10) in my sheet should show 20/80 – but it converts to 1/4.
I want to see 20/80. The denominator will change, so I can't do this # ??/80.

It also cannot be formatted as text, because this fraction needs to be used in future math operations.

Tips?

Best Answer

Try this instead of DIVIDE,

=QUERY(O4/M10,"select Col1 format Col1 '# ?/"&M10&"'")
  • M10:Denominator
  • O4:Numerator
  • By dynamically formatting Denominator to always be M10 through QUERY,We preserve the underlying number as well as the format(as opposed to TEXT ,Where we cannot change the underlying real value.)