about fractions

P

patrick

I would like to display a compound fraction, but i only want the whole number
and the numerator of the fraction to be displayed.

For example:
5- 14/30
displayed as: 5- 14

thanks for any help
patrick
 
Z

Zack Barresse

Hello Patrick,

You must use a formula for this as it can't be done with formatting alone.
You could use something like this ...

=INT(A1)&" - "&(A1-INT(A1))*30

...assuming your number was a valid number and resided in A1, and that you
always wanted it expressed in n/30.

HTH
 
P

paul

are the numbers always displayed in that format?ie with the dash and the /
=LEFT(A1,SEARCH("-",A1,1)-1)&MID(A1,FIND("-",A1,1),SEARCH("/",A1,1)-SEARCH("-",A1,1))
 
R

Ron Rosenfeld

I would like to display a compound fraction, but i only want the whole number
and the numerator of the fraction to be displayed.

For example:
5- 14/30
displayed as: 5- 14

thanks for any help
patrick

The value you display will be a text value. With the original number in H1:

=LEFT(TEXT(H1,"#""- ""??/30"),FIND("/",TEXT(H1,"#""- ""??/30"))-1)


--ron
 
P

patrick

zack, thanks! it worked great! although i ended up needing to round
(A1-INT(A1))*30
for some reason without the round function I would get 5-1.9999999999999
instead of 5-2

but it got me where i needed to be

Thank You
patrick
 
Top