Convert fraction to decimal

D

Dig

Is there anyway in Excel to format a cell so if the user types 61/4 it will
convert to 6.25? If not what is the best way to create a conversion so the
user can type in 51/2 and have 5.5 show up, either in another cell or in the
same cell?

Thanks for the help
 
G

Gary''s Student

In a separate cell enter:
=LEFT(A1,1)+MID(A1,2,1)/RIGHT(A1,1)

This works for very simple cases, but if you have something like:

111/25

we can't tell if its
11 & 1/25
or
1 & 11/25
 
E

Earl Kiosterud

Dig,

One possibility is to first format the cell as a number, such as with Format - Cells -
Number - Number. Now the automatic formatting to fraction number formatting when the user
types 6 1/4 won't occur. The problem is that you'll get fixed decimal place, unlike
General. We all wish we could disable automatic formatting for cells. We think they're
going to do that in 2057.

If that isn't satisfactory, an event-fired macro could automatically reformat it after the
user types in the 6 1/4.
--
Earl Kiosterud
www.smokeylake.com

Note: Top-posting has been the norm here.
Some folks prefer bottom-posting.
But if you bottom-post to a reply that's
already top-posted, the thread gets messy.
When in Rome...
 
L

Lori

Maybe use a custom format that returns the same as General e.g.

General;-General

so that it doesn't autoformat to a fraction format.
 
Top