I'm creating a spreadsheet for some carpentry related tasks. I'll have to do some more work to strip off the whole numbers and round... but this: =IF(0=MOD(C5,16)," ",IF(0=MOD(C5,8),"1/2",IF(0=MOD(C5,4),CONCATENATE(4-MOD(C5/4,4),"/4"),IF(0=MOD(C5,2),CONCATENATE(8-MOD(C5/2,8),"/8"),CONCATENATE(16-MOD(C5,16),"/16"))))) gives me the fractional part if I divide by 16 and do an INT() The fraction function gives useless 10ths as the denominator. Excel has an option to choose 16ths or 8ths, but it is evil because it shows 8/16ths when it should show 1/2 So I propose a format where we can give a list of possible denominators. 2,4,8,16,32 would be a common such list... and would basically be ran thru a function like what I wrote up there... but if someone wanted to have 3,9,12,14 or 1,2,3,5,7,11,13,17 as a list, they could get the nearest fraction. Performance could get challenging with long lists, but there should be some way to cache the formated answers, etc. 11 5/17 Really, this would enable this tool to interface with CAD software better where designs are already in inches. I'm happy to work on this project if there is some guidance, or at the next hackathon in Seattle.
There is also expectation to be compatible with Excel, even though it has annoying behavior.
@Aaron, Well sure, you're welcome to work on this. But do you envision trying to push this down into edit engine as a calc data format, with GUI on top--or might you be happier working this out as a macro based extension in your language of choice. Also, note that you've taken this for development. If that is not your intent, just edit the "Assigned to" field. Of course this has kicked around for quite some time within the OpenOffice world. Maybe check out some of the history to decide how deep you want to dive in. https://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=43964 and a similar macro based extension for Excel has been round for years: http://www.josh.com/InchCalc/index.htm might be worth porting if you're inclined. Stuart
Actually, you can force denominator with number format such as # ?/16 And it IS compatible with Excel fraction.