Macros & Excel VBA

How to Paste From Clipboard to Excel Using VBA

Method 1 - Paste from Clipboard in Single Cell Using VBA Before applying this method, you need to activate Microsoft Forms 2.0 Object Library for ...

How to Copy Sheet to End in Excel Using VBA (6 Methods)

We have a workbook with two worksheets, NewYork and Boston. The name of the workbook is "Excel VBA Copy Sheet to End". We have another workbook named ...

How to Filter and Delete Rows with VBA in Excel – 2 Methods

The sample dataset showcases Salesman, Product, and Net Sales of a company. Method 1 - Filtering the Visible Rows and Deleting them with ...

How to Copy Rows to Another Worksheet Based on Criteria by Excel VBA: 2 Ways

Method 1 - Copy Rows To Another Worksheet Based on Text Criteria ➤ Press ALT+F11 to open the VBA window. In the VBA window, ➤ Click the Insert ...

How to Use VBA PasteSpecial for Formulas and Formats in Excel – 3 Methods

VBA PasteSpecial Formulas and Formats - Quick View Sub Paste_Special() Dim Rasel As Worksheet Set Rasel = ThisWorkbook.Sheets("Formula and ...

Excel VBA: Copy Worksheet to Another Workbook Without Opening

We'll use the following source file "Source", saved in the .xlsm format. We'll use VBA code to copy a worksheet named "Dataset" to another workbook. ...

How to Copy Only Values to Destination with Excel VBA: 9 Step by Step Analysis

Method 1 - Copy Only Values to Destination with the PasteSpecial Method of Excel VBA ⧪ Step 1: Activating the Source Worksheet The 1st step that ...

Macro to Copy Specific Columns from One Worksheet to Another in Excel (6 Methods)

Method 1 - Copy selected Columns from One Worksheet to Another Using Macro The sample dataset contains some information about the employees of a ...

How to Use Excel VBA to Paste Range into Email Body (3 Methods)

Let’s assume a scenario where we have an Excel file that contains information about the employees of a company, including the Name, Age, Gender, Date ...

How to Autofilter and Copy Visible Rows with Excel VBA

The dataset below has 5 columns displaying a Site's name, Category, Date, Platform, and Number of Visits for each site. Method 1 – AutoFilter ...

Run Time Error 1004 – PasteSpecial Method of Range Class Failed (4 Reasons and Solutions)

Reason 1 - Accessing PasteSpecial Method without Copying Anything The most common reason for this error is attempting to use the PasteSpecial method ...

How to Concatenate Strings and Variables in Excel VBA (3 Examples)

Example 1: Developing a Macro to Concatenate string (s) and variable (s) in Excel VBA Here’s a dataset with book names, authors, and prices from a ...

How to Convert String to Number in Excel VBA (3 Methods)

Method 1 - Convert String to Number Using Type Conversion Functions Excel provides several built-in type conversion functions. We can use them in ...

How to Convert String to Double in Excel VBA (5 Methods)

  What is the CDbl Function? The VBA CDbl function converts an expression to a double. You'll see the following scenario if you insert the ...

Calculate Percentage in Excel VBA (Involving Macro, UDF, and UserForm)

  Code Overview for Calculating the Percentages via VBA Sub Calculate_Percentage() Dim Value1 As Variant Value1 = Range("D4").Value Dim ...

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo