How to Print Formula Syntax using VBA in Microsoft Excel?
Tags: toprintformulasyntax, vbamacros
Published: 2021-10-22 09:28:35

---
title: How to Print Formula Syntax using VBA in Microsoft Excel?
published: true
date: 2021-10-21 10:21:47 UTC
tags: ToPrintFormulaSyntax,VBAMacros
canonical_url: https://geekexcel.com/how-to-print-formula-syntax-using-vba-in-microsoft-excel/
---

In this article, you will learn how to  **print the formula syntax using VBA**  in Microsoft Excel. Let’s get them below!! Get an official version of MS Excel from the following link: **[https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)**

## Use Show Formulas option

- Firstly, you need to **create a sample values** and some are **extracted using formula** and some are not.

![](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/10/Sample-data-37-1024x532.png)<figcaption>Sample data</figcaption>

- In the Excel Worksheet, you have to go to the  **Developer Tab.**
- Then, you need to ** ** select the  **Visual Basic**  option under the  **Code**  section.

![Select Visual Basic](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/09/Select-Visual-Basic-9-1024x180.png)<figcaption>Select Visual Basic</figcaption>

- Now, you have to go to **Formulas** and click on **Show formulas** under **Formula Auditing**.

![](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/10/Click-on-Show-formulas-1024x159.png)<figcaption>Click on Show formulas</figcaption>

- After that, you need to click the **Show Formula option** to **view all formulas of the sheet** or use the **shortcut Ctrl + ` (tilde)** from the keyboard.
- Finally, this **option** lets you **view all Excel Formulas** used in the worksheet instead of the results.

![](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/10/Output-37-1024x329.png)<figcaption>Output</figcaption>

## To view the Formula of a particular cell

- Firstly, you have to use the **single quote mark in front of the formula** and let you show only formulas, not the result of the cell.
- Then, you need to use the **formula** as given below.

```
=TEXT(A2, "m")
```

![](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/10/Output1-2.png)<figcaption>Result of the cell</figcaption>

- Now, you have to view **formulas on B2 & C3**  **cell** and just **apply one single quote mark** in front of the formula.
- After that, you need to use the **formula** as given below.

```
'=TEXT(A2, "m")
```

![](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/10/Output2-1.png)<figcaption>Apply one single quote mark</figcaption>

- Finally, you have to apply the same in **C3 cell to view Excel formula** instead of results.

![](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/10/Output3.png)<figcaption>Apply the same in C3 cell</figcaption>

**NOTES:**

- Each Formula in Excel starts with ( = ) sign.
- Sometimes there exist a curly brace in the start of formula, which is an array formula and called using the Ctrl + Shift + Enter. Do not put curly braces manually.
- Text values and characters are always given using quotes or using cell reference.
- Numerical values can be given directly or using the cell reference.
- Array can be given using the array reference or using named ranges.

## Summary

We hope that this article gives you guidelines on how to  **print the formula syntax using VBA ** in Microsoft Excel. Please leave a comment in case of any  **queries,**  and don’t forget to mention your valuable  **suggestions**  as well. Thank you so much for Visiting Our Site!! Continue learning on **[Geek Excel](https://geekexcel.com/)!! **Read more on [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!!**

**Read Ahead:**

- **[How to Print Selected Contents in Excel? A Complete Guide!!](https://geekexcel.com/how-to-print-selected-contents-excel/)**
- **[Quickly Print First Page of Each Worksheet in Excel Office 365!!](https://geekexcel.com/quickly-print-first-page-of-each-worksheet-in-excel-office-365/)**
- **[Print Only the Charts in Excel 365 using Kutools](https://geekexcel.com/how-to-print-only-the-charts-in-excel-365-using-kutools/)**
- **[How to Use Excel SUM Function in Office 365? [With Examples]](https://geekexcel.com/sum-function/)**
- **[How to Check the Print Preview in Excel Office 365?](https://geekexcel.com/check-print-preview-in-excel/)**