Macros & Excel VBA

How to Add Hyperlink to Cell Value in Excel Using VBA (4 Methods)

Method 1 - Embed VBA to Add Hyperlink from a Different Worksheet to a Cell Value in the Active Sheet Let’s consider the following dataset: In our ...

Excel VBA: Split Sheet into Multiple Sheets Based on Rows

The sample dataset below will be used for demonstration. Procedure 1 - Build the Code Press Alt+F11 on your keyboard to open the VBA ...

Excel VBA: Remove Duplicates Comparing Multiple Columns: 3 Methods

Method 1 - Remove Duplicates Comparing Specified Multiple Columns Using VBA in Excel Task: We want to remove duplicate students from the dataset by ...

Excel VBA: Remove Duplicates from an Array (2 Examples)

In this article, we'll demonstrate how to remove duplicates from an array using Excel VBA code. VBA Code Quick View Sub ...

Create a Table from Range in Excel VBA – 6 Examples

This is the sample dataset. Choose ListObjects.Add to turn a range into an Excel table. The criteria for .Add are the following: ...

Excel VBA: Set Print Area for Multiple Ranges (5 Examples)

In this article, we will discuss 5 examples related to setting the print area for multiple ranges using VBA in Excel. Example 1 - Print ...

Excel VBA: Random Number Generator with No Duplicates – 4 Examples

Enter a Code in the Visual Basic Editor To generate random numbers with no duplicates, open Visual Basic Editor and use a VBA code.  Go to ...

Excel VBA for Random Selection from List: 3 Easy Methods

Let’s get introduced to our dataset first, which represents some students’ IDs, Names, and Ages. Method 1 - Excel VBA to Select Only One ...

How to Generate Random Numbers in a Range with Excel VBA

Here's a quick overview of the code that assigns random numbers. Sub Random_Numbers_with_Rnd() Bottom = 11 Top = 20 Random_Number = ...

Excel VBA: Combined If and Or (3 Examples)

While working with VBA in Excel, we often have to use combined If and Or to carry on a task when at least one among multiple conditions is satisfied. ...

Insert a Column with a Name in Excel VBA – 5 Examples

Example 1 - Insert a Single Column with a Name in Excel Using VBA The following dataset showcases sales data in different cities and in different ...

How to Print Multiple Excel Sheets in a Single PDF File with VBA (6 Methods)

We have an Excel workbook consisting of three worksheets. The first worksheet is Sheet 1, and the data is shown in the picture below. The ...

Excel VBA: Cut and Insert Column (5 Examples)

We’ll use the Range.Cut method to cut single or multiple columns and then the Range.Insert method to insert into the worksheet. We’re going to use ...

Excel Button to Print Specific Sheets: 7 Easy Methods

There are three different sheets in our reference Excel file. We will print specific sheets from that file using the Excel button.   ...

Excel VBA: Move Column Based on Header (3 Examples)

While working with VBA in Excel, we often need to move one or more column (s) based on Header (s). In this article, I’ll show you how you can move a ...

Close the CTA

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo