Macros & Excel VBA

Print to PDF and Email Using VBA in Excel: 2 Useful Cases

Method 1 - Print to PDF and Email for Single Worksheet ➜ Open a module by clicking Developer > Visual Basic (or press ALT + F11). ➜ Go to ...

How to Open a Word Document and Replace Text with Excel VBA (6 Examples)

In the following sections, we will provide six examples of how to open a Word document and replace text using VBA in Excel. Some things to ...

Excel VBA: Create Invoice and Save PDF Format (with Quick Steps)

Create an Invoice and Save it in the PDF Format with Excel VBA (Quick View) Private Sub Create_invoice_save_pdf() 'for invoice number ...

Excel VBA: Pull Data Automatically from a Website (2 Methods)

  Excel VBA to Pull Data Automatically from a Website (Quick View) Sub Pull_Data_from_Website() Website_Address = "https://exceldemy.com" ...

VBA to Generate Multiple Lines in Email Body in Excel: 2 Methods

Method 1 - Embed VBA Macro to Generate Multiple Lines in Email Body in Excel Steps: Press Alt + F11 on your keyboard or go to the tab Developer ...

How to Split First Name and Last Name with Excel VBA – 3 Examples

Introduction: The VBA Split Function: is used to split a string into substrings. The function returns a zero-based one-dimensional array. Each ...

How to Sum a Range of Cells in a Row Using Excel VBA (6 Methods)

To demonstrate our methods, we have a dataset with three columns: “Fruit,” “March Sale,” and “April Sale.” Method 1 - Using the FormulaR1C1 ...

How to Split Date and Time Using VBA in Excel – 2 Methods

Quick View: Sub Split_Date_and_Time() Date_with_Time = CDate(InputBox("Enter the Date with Time: ")) Separated_Date = Int(Date_with_Time) ...

Excel VBA: Split String by Character: 6 Useful Methods

Method 1 - Split Words of a String by Space Character  Task: Split a text string in cell B3 by space character and output the substrings in cells ...

How to Filter a Table based on Cell Values with Excel VBA (6 Methods)

Dataset Overview We've included a sample dataset in the figure below, from which we'll sift through values according to specific cell criteria. ...

How to Remove Filter in Excel VBA (5 Simple Methods)

To remove filters from data, we are going to use the following dataset. It contains some product IDs in column B, product names in column C, and the ...

Subtracting One Range from Another in Excel VBA – 3 Examples

The following dataset contains sales records of different products in different regions.   Example 1 - Getting a Range Address ...

How to Hide Blank Rows in Excel VBA (4 Examples)

Below is a dataset of the sale details for different products. It contains a couple of blank rows that we will hide using simple VBA code. The ...

Using a VBA IF Statement with Multiple Conditions in Excel – 8 Methods

Method 1 - Using a VBA IF Statement with Multiple Conditions: IF with OR Consider the following macro. Sub IfWithOr() If 5 < 10 Or 10 < 5 ...

Split a Workbook to Separate Excel Files with VBA Code: 3 Ways

Method 1 - Split a Worksheet of a Workbook Based on a Column to Separate Excel Files Step-01: ➤ Go to the Developer Tab >> Visual Basic ...

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo