MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Help with fractions


Posted by Steve Smith on September 16, 2000 6:56 PM

I need to create a spreadsheet for a friend to track his portfolio with. So far everything is great, except for fractions. I need it to display a value as a fraction, but it can only be x/2, x/4, x/8, x/16 or x/32. I formatted the cell to convert it to x/32, but then I end up with fractions like 16/32 and I need it to display it as 1/2. Example: A cell value is 39.87. When I format the cell to fraction (2 digits) it displays as 39 20/23. However, I need the closest value in one of the above mentioned formats, so the closest is 28/32. Now we all know this to be 7/8, but I cannot figure out how to get it to get it down to the lowest denominator.
Thanks,
Steve


Posted by Celia on September 18, 0100 12:31 AM

Steve
Actually, it can be done with the standard ROUND worksheet function, but with MROUND it is a little neater :-

=ROUND((your formula)*32,0)*1/32

Celia

Posted by Steve Smith on September 17, 0100 7:18 PM

That was it, it works exactly as I needed it to. I didn't have MROUND available to me, had to install it. I must have spent an hour reading through all the functions, I knew there had to be one.
Thanks,
Steve

Posted by Celia on September 16, 0100 8:54 PM


Steve
I don't know a way if amounts are input to a cell with the keyboard, but if the amount displayed in a cell is the result of a formula, then format the cell as # ??/?? and structure your formula like this :-

=MROUND((your formula),1/32)

Celia