Macros & Excel VBA

How to Use Excel VBA to Hide Columns Based on Cell Value (15 Examples)

To demonstrate, we have a dataset of 5 students. Their name, department, examination marks, grades, DOB, and retake examination marks are in the ...

How to Remove Gridlines in Excel Using VBA

In this article, we will demonstrate 3 quick ways to remove Gridlines in Excel using VBA. To demonstrate our methods, we will use the following ...

Using Excel VBA to Hide Columns Based on Criteria – 6 Examples

The sample dataset showcases: Salesman, Product, and Net Sales. Example 1 - Apply Excel VBA to Hide Columns Based on the Cell Value X is ...

Using Excel VBA to Open a Workbook in the Background – 2 Examples

This is File1. This is File2. Example 1 - Open a Secondary Workbook in the Background with Excel VBA STEPS: Go to the ...

How to Find Special Characters Using VBA in Excel: 3 Quick Methods

Method 1 - Using a Simple User Defined Function to Find Special Characters Steps: Go to the Developer Tab and select Visual Basic. The ...

How to Hide Rows with Zero Values in Excel Using Macro: 3 Suitable Macros

Method 1 - Applying Macro InputBox to Hide Rows with Zeros in Excel Steps: Bring up the VBA Module window, where we type our codes. From the ...

How to Change the Column Header Name in Excel VBA – 3 Examples

This is an overview. This is the sample dataset. Example 1 - Change the Column Header Name Based on the Cell Property This ...

How to Save Chart as Image Using VBA in Excel (2 Easy Methods)

In general, you can save a chart as an image from the Context Menu by right-clicking. However this gets tedious when you have many charts in your ...

How to Insert Page Break Based on Cell Value with Excel VBA

We have a dataset with 3 columns: Product, Brand, and Price. We will slightly edit this data for each method. Make sure that the Developer tab is ...

Excel VBA: Print Preview for Selected Range (5 Examples)

In this article we will demonstrate some methods for printing previews for a selected range of cells in Excel by using Microsoft Visual Basic for ...

Excel VBA to Convert Textbox Value to Number (2 Ideal Examples)

How to Add a Textbox in Excel STEPS: Go to the Developer tab and select the Insert icon. A drop-down menu will appear. Select the Text Box ...

VBA Code to Compare Two Excel Sheets and Copy Differences

The sample dataset below will be used for illustration. It contains the Salesman, Product and Net Sales in  Sheet1. The 7th and 8th rows are empty. ...

Auto Generate Serial Number in Excel VBA (4 Ways)

The sample dataset Customer Credentials, into which serial numbers are to be inserted adjacent to those entries.   Method 1 - Using ...

Using Excel VBA to Capitalize the First Letter of Each Word – 3 Examples

The dataset contains employee names and their designation. To capitalize the first letter of each word: Example 1 - Using the VBA ...

Excel VBA: If Statement Based on Cell Value: 2 Practical Methods

Method 1 - If Statement Based on Cell Value of a Single Cell in Excel VBA We’ll learn to use an If statement based on the value of a single cell. ...

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo