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.


How to Add a Stacked Fraction in Excel: 5 Ways

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.

Read More: How to Write a Fraction in Excel


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.


Download Practice Workbook

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


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.


Related Articles


<< Go Back to Fraction in Excel | Number Format | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Sourov Hossain Mithun
Md. Sourov Hossain Mithun

Md. Sourov Hossain Mithun, an Excel and VBA Content Developer at Softeko's ExcelDemy project, joined in October 2021. Holding a Naval Architecture & Marine Engineering degree from BUET, Mithun showcases expertise during his two-year tenure. With over 200 published articles on Excel topics, he earned a promotion to Team Leader, excelling in leading diverse teams. Mithun's passion extends to Advanced Excel, Excel VBA, Data Analysis, and Python programming, contributing significantly to the innovative and dynamic environment of ExcelDemy... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo