How about a binary fraction format for calc for inch rulers and tapes

Because this is not a bug but rather a suggestion, I chose this path. It could be considered a question by posing it as “could this be added?”.

A useful addition to LibreOffice Calc would be a new cell fraction format. Likely not obvious to users of the metric system, but for those of us who use tape measures calibrated in inches, fractions like 4/9, 5/7, 2/5 don’t really help. It is easy to plug in decimal equivalents to common fractions and compute in decimals. But neither decimal nor the provided fraction format really provide tape compatible numbers. Inch clibrated tape measures have marks only for binary fractions 1/2, 1/4, etc. Most tapes stop at 1/16. Some rulers go to 1/128th.

A user can look up the decimal fraction in a wire and drill size conversion table but that gets old for a lot of numbers.

An ideal new format would allow the user to specify a denominator, 2, 4, 8, 16, 32, 64, or 128 and the result would be the closest fraction meeting the choice. It would be nice to be able to select closest, closest-under or closest-over.

A user could choose the binary fraction cell format, specify a precision and whether closest, under, or over, and get useful numbers found on his measuring device.

The answer is baked into LibreOffice already! I too sometimes use petty fractions in my spreadsheets. Not often, but enough to have a solution:

Go to Format Cells, and in the Numbers section, scroll down to Fractions. You should see two options in the Format box: -1234 1/8 and -1234 10/81. You can go to the Format Code box and add a third query mark both before and after the forward slash to get # ???/???. This looks odd, especially if you use # ???/??? format and use small fractions like 1/4, and I’m not sure how to remove the spaces, but this will solve the problem until an official deeper implementation comes around.

Hope that helps you out.

Hi @OpaSmurf,

try this, follow the instructions from or_nightwolf to format a cell for fractions. But instead of using “# ??/??” edit the field to “# ??/128” or “# ??/64” or…

Now it will display your number as the nearest 2,4,…,128. If you omitt the “#” in the format it will not show you the full integers.

BTW it works only correct since LO3.5.6. and the custom formats are only saved in the file not in Calc.

Hi @OpaSmurf,

Regarding whether this could be added, I guess the answer is: Yes!

Regarding actually implementing this, please file an enhancement bug and provide as much information as possible. It’s possible that this lookup chart could be implemented with just macros in Calc, but based on your suggestion of “an ideal new format,” you might have to modify things at a more fundamental level.

Don’t forget to mark your bug as an ‘enhancement’. The QA team will be happy to help you triage your feature request in the bugtracker.

Please post a link to any bugs you file in a comment below using the format “fdo#123456”.

Thanks!