Convert decimal to fraction

pukenzz

New Member
Joined
Jun 29, 2015
Messages
35
I know this question has been asked all over the place but I still am not finding the answer I am hoping for…

I want a cell formatted so that it outputs a fraction to the nearest 1/32 of an in or reduces it to the least common denominator. This should happen in the same cell I key it in. So it would be a number format not a cell formula.

It can round up or down to the nearest 32nd
Fraction As sixteenths (8/16) is not precise enough.
Fraction Up to two digits (21/25) does not provide a fraction that would be found on a tape measure.
Custom # ??/32 does not reduce the fraction

And I want it all to happen right in the cell I’m entering the number. I don’t want to have it converted via a formula and result in a different cell.

Also the number should have an “ mark on it. I don’t care how I have to input the number. I’m thinking it would be nice if 22 5/16” could be entered two or three possible ways… 22.3125 or =22+.3125 or 22+5/16.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
So if you enter 22.3125, is 22 10/32" the right answer?
 
Upvote 0
If you want the fraction reduced, you'll need to either use a formula in another cell, or VBA. You can't do it via formatting alone.
 
Upvote 0
If you want the fraction reduced, you'll need to either use a formula in another cell, or VBA. You can't do it via formatting alone.


Have you tried...

# ??/??" inches"

The question marks reduce the fraction to the lowest common denominator, while the " inches" adds, well, " inches" rather than the " symbol.

Cheers,

tonyyy
 
Upvote 0
Have you tried...

# ??/??" inches"

The question marks reduce the fraction to the lowest common denominator, while the " inches" adds, well, " inches" rather than the " symbol.

Cheers,

tonyyy

Or, if you want to get tricky, you could use...

# ??/??"''"

Where there are two apostrophe symbols between the quotes.
 
Upvote 0
Have you tried...

# ??/??" inches"

The question marks reduce the fraction to the lowest common denominator, while the " inches" adds, well, " inches" rather than the " symbol.

Cheers,

tonyyy
It doesn't round to 32nds, though:

Row\Col
A​
B​
1​
3.14​
2​
3 7/50 inches​
A2: =A1
3​
Format of A2: # ??/??" inches"
 
Upvote 0
It doesn't round to 32nds, though:

Row\Col
A​
B​
1​
3.14​
2​
3 7/50 inches​
A2: =A1
3​
Format of A2: # ??/??" inches"

<tbody>
</tbody>

You're quite right, shg. I missed that part of the request when replying. But short of using vba or another cell for a formula, is there a way to use conditional formatting to detect non-32nd denominators (or their reductions) and then apply the # ??/32 format mask?
 
Upvote 0

Forum statistics

Threads
1,215,472
Messages
6,125,005
Members
449,203
Latest member
Daymo66

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