fraction format

M

mefromfl

Hi, i want to know if there is any way i can type in my cell so that a
fraction such as "8 1/2" appears to be "8 with normal font size and the
1/2 to be smaller font size.

i'm now just entering 8.5 and the out come is 8 1/2, but i wanna make
it so the 1/2 is smaller.

Thanx in adavance for ur reply.
 
B

Bob Umlas

You COULD use this, but it'd only be available as text, not a real #:
=IF(MOD(B1*10,10)=5,INT(B1)&"½",B1)
you can get the ½ by pressing and holding the alt key while typing 0189 on
the numeric keypad. When you let go, you'll see the ½.
 
D

Don Guillett

right click sheet tab>view code>copy/paste this>modify =5 to suit your
column and .size to suit. pre-format as TEXT

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 5 Then
x = InStr(Target, " ") + 1
y = Len(Target) - x + 1
Target.Characters(Start:=x, Length:=y).Font.Size = 6
End If
End Sub
 
R

Ron Rosenfeld

Hi, i want to know if there is any way i can type in my cell so that a
fraction such as "8 1/2" appears to be "8 with normal font size and the
1/2 to be smaller font size.

i'm now just entering 8.5 and the out come is 8 1/2, but i wanna make
it so the 1/2 is smaller.

Thanx in adavance for ur reply.

Is this just for display, or do you also want to perform calculations?

The only way I know of to obtain that sort of display is with a TEXT field. So
if you also needed to perform calculations, you would have to have separate
fields for data entry and display.

If it's just for display, and if you just want to use "quarters" (e.g. 1/4,
1/2, 3/4), you could use a VB event triggered macro to take the integer part of
the number and append the font character for those values (alt-0188; alt-0189;
alt-0190).

Again, if it is just for display, a bit more complicated would be to, again as
text, format the fractional part to a smaller font.

Let us know.


--ron
 
M

mefromfl

Thanx alot guys, i used the alt 0189, and it works perfect, i'm jus
doing a foot ball schedules. so it just for displaying. But thanx t
everyone who replied. The 1/2 looks kinna high, no way i can make i
align to the bottom
 
Top