Add a Degree Symbol to Selection Range using Macros (VBA) in Excel!
Tags: addadegreesymbolinex, vbamacros
Published: 2021-02-09 09:44:43

---
title: Add a Degree Symbol to Selection Range using Macros (VBA) in Excel!
published: true
date: 2021-02-05 09:10:39 UTC
tags: AddaDegreeSymbolinEx,VBAMacros
canonical_url: https://geekexcel.com/add-a-degree-symbol-to-selection-range-using-macros-vba-in-excel/
---

If you want to add a [degree](https://geekexcel.com/how-to-use-excel-degrees-function-in-office-365-with-examples/) symbol to a specific range of data in the Excel worksheet, what would you do? We are here to help you to do that. In this useful post, we are going to see how to **Add a Degree Symbol to the selection Range** using **Macros ([VBA](https://geekexcel.com/excel-office-365-vba-overview-definition-and-examples/)) in Excel** Office 365. You just follow the instructions given below to finish this task.

## Use Macros to Add a Degree Symbol to Selection Range:

- In the following image, you can see the **list of numbers** in the range **B1:B5** and we are going to add a degree symbol to this range using Macros.

![Input range](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/02/EXCEL_ash4rbFvc5.png)<figcaption id="caption-attachment-21701">Input range</figcaption>

- On the **Developer Tab, select** the **Visual Basic** option under the **Code** section.

![Select Visual Basic option](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/Select-Visual-Basic-option-4.png)<figcaption id="caption-attachment-14755">Select the Visual Basic option</figcaption>

- Then you need to copy and paste the code given below.

VBA code to add a degree symbol using Macros

Sub AddDegreeSymbol()

Dim rng As Range

For Each rng In Selection

‘Select the active cell

rng.Select

‘For each number, add the degree symbol at the end

If ActiveCell <> “” Then

If IsNumeric(ActiveCell.Value) Then

ActiveCell.Value = ActiveCell.Value & “°”

End If

End If

Next

End Sub

- You need to **save the code** by selecting it. Then **close** the **window.**

![Save the code](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/02/EXCEL_v6VgC0tbj8.png)<figcaption id="caption-attachment-21703">Save the code</figcaption>

- You have to open the sheet containing the data. On the **Developer Tab, choose** the **Macros option** in the **Code** section.

![Choose the Macros option](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/Choose-the-Macros-option-2.png)<figcaption id="caption-attachment-14747">Choose the Macros option</figcaption>

- You need to make sure that your macro is selected and **click** the **Run** button.

![Click Run button](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/02/EXCEL_wYUXGbLoCl.png)<figcaption id="caption-attachment-21705">Click Run button</figcaption>

- As a result, you will see the **added degree symbol** in the selected range as shown in the below screenshot.

![Output](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/02/EXCEL_GFa7DFzy5w.png)<figcaption id="caption-attachment-21706">Output</figcaption>

## A Short Summary:

In this useful post, we have learned the step-by-step instructions to **Add a Degree Symbol to the selection Range** using **Macros ([VBA](https://geekexcel.com/excel-office-365-vba-overview-definition-and-examples/)) in Excel** Office 365. Share your **feedback** in the below comment section. Thanks for visiting **[Geek Excel.](https://geekexcel.com/)** Keep Learning!

#### Related Posts:

- [Convert Chart into Image using Macros (VBA) in Excel Office 365!!](https://geekexcel.com/convert-chart-into-image-using-macros-vba-in-excel-office-365/)
- [Create a Table of Contents using Macros (VBA) in Excel Office 365!](https://geekexcel.com/create-a-table-of-contents-using-macros-vba-in-excel-office-365/)
- [Resize All Charts using Macros (VBA) in Excel Office 365!!](https://geekexcel.com/resize-all-charts-using-macros-vba-in-excel-office-365/)