Macros & Excel VBA

Excel VBA: Round to Nearest 5 (Macro and UDF)

While working with data sets in VBA in Excel, we often need to round a single value or a set of values to the nearest 5. In this article, I’ll show ...

Lock a Cell after Data Entry Using Excel VBA with Message Box Notification Before Locking

In this article, we will use 2 methods to lock a cell after data entry using Excel VBA. To illustrate these methods we will use the dataset below. ...

Macro to Send Email from Excel (5 Suitable Examples)

We'll use a simple dataset with a list of people, their emails, and the city they're from to send emails to them. Use Macro to Send Email ...

How to Generate Reports Using Macros in Excel (with Easy Steps)

In this article, we’ll demonstrate a quick, effective method to generate reports in Excel using Macros. Quick View of the Macro Code Private ...

Excel VBA to Read CSV File into Array (4 Ideal Examples)

  What Is a CSV File? A CSV file is a comma-separated values file, which saves data in an organized format. CSV files are compatible with many ...

Excel VBA to Replace Blank Cells with Text (3 Examples)

We have a dataset of some students containing their names, class, and percentage in the examination. There are some blank cells in the Percentage ...

Excel VBA: How to Replace Text in a String – 5 Methods

This is the sample dataset.   Method 1 - Using Excel VBA to Replace a Text Starting in the n-th Position of a Random String Step ...

How to Send an Email to an Address in a Cell using an Excel Macro- 2 Methods

This is an overview: Sub Send_Email_with_Attachment() Dim MyOutlook As Object Set MyOutlook = CreateObject("Outlook.Application") Dim MyMail ...

Unprotect Excel Sheet Without Password Using VBA: 3 Simple Steps

Method 01 - Opening Visual Basic Editor Window We have a sheet VBA where we have some records of the products, and we have protected it with a ...

Excel VBA to Print As PDF and Save with Automatic File Name (9 Methods)

  Method 1 - Print Workbook to PDF & Save File Name Automatically in Excel In this example we will print the whole workbook and save the ...

How to Send an Email with Body from Excel Using a Macro – Easy Steps

Step 1 - Set the Object Reference to Microsoft Outlook Go to the Developer tab on the Ribbon. Click Visual Basic. In the visual ...

How to Open All Excel Files in a Folder and Copy Data from Them: 5 Method Analysis

⧪ Method 1 - Setting Up the Environment Set some necessary parameters to the required values to set up an environment for running the code ...

How to Use Excel Macro to Send Email Automatically (3 Examples)

Complete the following steps before applying a macro to send email automatically. STEPS: From your dataset, go to the Developer tab. Select ...

How to Open a Word Document and Save it As PDF or Docx with VBA in Excel – 2 Examples

Consider the following image of a word file. The file “Student Information” is stored at C:\ExcelDemy\. Use a VBA code to open it and then ...

Excel VBA: Unprotect Workbook with Password: 7 Practical Methods

Method 1 - Unprotect a Single Workbook with a Password in Excel VBA Task: Unprotect the workbook named workbook_1.xlsx inside the Exceldemy folder ...

Close the CTA

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo