Macros & Excel VBA

Excel VBA Codes to Bold Text in a String (5 Examples)

In this tutorial, you will learn how to make a text bold in a string using Excel VBA, along with other related tasks. Example 1 - Bold the ...

How to Delete Columns Based on the Header Using VBA in Excel – 6 Methods

The sample dataset showcases sold Products, Order Date, City, Category, Quantity, and Unit Price. To delete columns:   Opening ...

How to Copy Data from Another Workbook without Opening with Excel VBA: 3 Different Ways

We will use a sample Workbook named Product_Details and copy the data range (B4:E10) to another Workbook. Method 1 - Copy a Sheet Data ...

How to Copy Values and Formats with Paste Special in Excel VBA

Method 1 – Applying an InputBox in VBA Paste Special Steps: Go to the Developer tab. Click on Record Macro. Set Excel_Paste_Special_1 ...

Using VBA to Count Duplicates in a Range in Excel – 4 Methods

Method 1 - Embed VBA to Count Duplicate Values in a Range in Excel In the following dataset, Column B contains random numbers. D5 displays 2473. ...

Using VBA to Copy a Formula from the Cell Above in Excel – 10 Methods

This is an overview. The dataset shows mathematical results in column B. The formula behind the results for each cell is shown in Column D. If ...

How to Apply VBA PasteSpecial and Keep Source Formatting in Excel: 4 Easy Examples

Method 1 - Add Input Box by Using VBA PasteSpecial and Keep Source Formatting in Excel Press  Alt  +  F11   to start a Macro. Click on the ...

AutoFill Formula to Last Row with Excel VBA (5 Examples)

  What Is AutoFill in Excel? Autofill is a built-in feature of Microsoft Excel that allows users to automatically fill the rest of the rows or ...

Copy and Paste Values to Next Empty Row with Excel VBA (3 Examples)

Method 1 - Copy a Range of Cells and Paste Values from the Next Empty Row in Excel Using VBA Code In this particular example, we will copy row 11 ...

How to Delete a Row Using Macro If a Cell Contains 0 in Excel (4 Methods)

The dataset below shows the Number of Visits, the Names of the Sites, and the Dates. Some sites have a cell value (Number of Visits) of 0. In such a ...

How to Count Filled Cells in Excel Using VBA: 7 Methods

Method 1 - Use VBA Macro to Count Filled Cells from a Range Step 1: Open Microsoft Visual Basic, insert a Module using the instruction section. ...

How to Copy Worksheet to Another Workbook Using VBA

For illustration, we have a sample workbook named "Source" with three worksheets "List-1", "List-2", and "List-3". We will copy these ...

VBA to Copy Worksheet to Another Workbook and Rename: 5 Methods

Method 1 - Embed VBA to Copy One Worksheet to Another Excel Workbook and Rename It Steps: Press Alt + F11 on your keyboard or go to the tab ...

Macro to Copy and Paste from One Worksheet to Another (15 Methods)

We'll use the following sample dataset to showcase how you can copy and paste values between worksheets. Method 1 - Embed VBA Macro to ...

How to Delete Duplicate Rows in Excel Using VBA (8 Methods)

Dataset Overview To explain these methods, we will use a dataset that contains information about the department, working hours, and the salary of ...

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo