Macros & Excel VBA

How to Use VBA to Paste Values Only with No Formatting in Excel

People use VBA to run a macro for various purposes. For instance, we can use VBA to Paste values only with no formatting in Excel. In this article, I ...

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 ...

How to Copy Multiple Rows in Excel Using Macro (4 Examples)

In this article, we’ll illustrate how to copy multiple rows in the same or different worksheets and paste them over existing rows or newly inserted ...

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 ...

Excel VBA to Count Cells Containing Specific Text

Sometimes we need to know how many times a certain text appears within a range of data in excel. For example, consider a dataset containing dates and ...

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 ...

VBA to Copy Excel Worksheet to Another Workbook without Formulas

In Excel, we often need to copy a worksheet to another workbook without formulas with VBA. We can use both the context menu and VBA for this. Today, ...

How to Copy Visible Cells Only without Header Using VBA

After filtering data using the auto filter in Excel, we need to copy visible cells only without a header. We can do this very easily using the VBA ...

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 ...

PasteSpecial Method of Worksheet Class Failed

While working with Excel VBA, you will face a lot of runtime errors. It is very usual to get these problems. Over time, you will get more promising ...

Excel VBA to Convert Date and Time to Date Only

It often becomes necessary to convert a range of dates and times to dates only. We can use Excel VBA to convert date and time to date only. This ...

Close the CTA

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo