To format a real number as a fraction:
Select the Cells command from the Format menu (or right-click and select Format Cells).
Select the Number tab in the "Format" dialog box.
Select Fraction from the numbers list. The "Fraction" group box will be displayed.
In the Display As box, you can select Auto (the nearest representation of the number as a fraction) or round the fraction to the nearest 100th, 10th, 16th, 8th or 4th.
You can also choose to have the integer part of fractional numbers displayed with commas, negatives in brackets or in red, as with other numbers - see Formatting a number.
A sample of the options you have chosen is given in the Preview box. When you have finished, click on the OK button and the fraction will be formatted to your specification.