How to Add a Stacked Fraction in Excel (5 Simple Ways)

Excel stores fraction values as decimals in number format by default. But sometimes we may need to represent it as a stacked fraction for different purposes. So in this article, I’ll show 5 useful ways to add a stacked fraction in Excel.


Download Practice Workbook

You can download the free Excel workbook from here and practice on your own.


5 Ways to Add a Stacked Fraction in Excel

First, get introduced to our dataset that represents some Engineering Nut’s names and diameters in inches.


1. Using Fraction Format to Add a Stacked Fraction

In our very first method, we’ll learn the basic and simple way to add a stacked fraction in Excel, we’ll just change the format from number to fraction.

Steps:

  • First, select the cells C6:C10 and click Home > Number.
  • Then click on the drop-down icon from the Number section and select Fraction from the appeared list.

Using Fraction Format to Add a Stacked Fraction

Now have a look, Fraction format is showing the values as stacked fractions.


2. Custom Number Format to Add a Stacked Fraction in Excel

Also, there are some custom number formats in Excel by which we can get stacked fractions.

Steps:

  • Click on the Number Format icon from the Number section of the Home ribbon.

Custom Number Format to Add a Stacked Fraction in Excel

  • After appearing the Format Cells dialog box, click on Fraction from the ‘Category box’.
  • Then you will get some custom fraction formats in the ‘Type’ box. Choose one of them, I chose As quarters (2/4).
  • Finally, just press OK.

Custom Number Format to Add a Stacked Fraction in Excel

The values are now converted to approximate quarter values.


3. Inserting Excel Equation to Add a Stacked Fraction

We know Excel has the Equation feature which can be used to add a stacked fraction. The Equation’s advantage is that it can change the presentation of a stacked fraction.

Steps:

  • Click as follows: Insert > Symbols > Equation.

Inserting Excel Equation to Add a Stacked Fraction

  • Later, click Equation > Fraction.
  • Next, select any of your desired fraction types. I selected the first one.

Inserting Excel Equation to Add a Stacked Fraction

  • After that, type 1 in the numerator and 2 in the denominator positions.

Inserting Excel Equation to Add a Stacked Fraction

  • Then click anywhere out of the equation box and you will get the stacked fraction.

Inserting Excel Equation to Add a Stacked Fraction

Following the same procedures, create the other stacked fractions.


4. Inserting Symbol to Add a Stacked Fraction

There are some built-in fraction symbols in Excel that you can use if they matched your required stacked fraction. The problem is- the fraction symbols are limited.

Steps:

  • First, select a cell and click as follows: Insert > Symbols > Symbol.

Soon after you will get a dialog box named ‘Symbol’.

Inserting Symbol to Add a Stacked Fraction

  • See, there are some fraction symbols in the dialog box, select one of them and click Insert.

Inserting Symbol to Add a Stacked Fraction

The inserted symbol will look like the image below.

Inserting Symbol to Add a Stacked Fraction

In the same way, insert the symbols into the other cells.


5. VBA Macro to Add a Stacked Fraction in Excel

By using Excel VBA Macro, we can make a stacked fraction differently. We can input the numerator and the denominator into two different cells and then use them to make a stacked fraction. I placed 22 as the numerator in Cell C5 and 7 as the denominator in Cell C7 and will show the stacked fraction in Cell C8.

Steps:

  • Press ALT + F11 to open the VBA window.

VBA Macro to Add a Stacked Fraction in Excel

  • Then click Insert > Module to open a new module.

VBA Macro to Add a Stacked Fraction in Excel

  • After that, type the following codes in it-
Option Explicit
Sub Stacked_Fraction()
ActiveCell.FormulaR1C1 = Range("C5") & Chr(10) & "—" & Chr(10) & Range("C6")
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
End Sub
  • Next, go back to your sheet.

VBA Macro to Add a Stacked Fraction in Excel

  • Select the cell where you want to get the fraction. I selected Cell C8.
  • Then click as follows: Developer > Macros to open the Macros dialog box.

VBA Macro to Add a Stacked Fraction in Excel

  • At this moment, just select the Macro Name and press Run.

VBA Macro to Add a Stacked Fraction in Excel

Here’s our stacked fraction after using the VBA macro.


Conclusion

I hope the procedures described above will be good enough to add a stacked fraction in Excel. Feel free to ask any question in the comment section and please give me feedback. Visit ExcelDemy to explore more.

Mithun

Mithun

Hello! I am Md. Sourov Hossain Mithun. Welcome to my profile. Currently, I am working at Exceldemy as an Excel and VBA Content Developer. Excel is amazing software. Here I will post excel related useful articles. I am a graduate of Bangladesh University of Engineering and Technology. I love to learn new things and work with them. Thank you.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo