Macros & Excel VBA

VBA Code for Subtotal in Excel (3 Ways)

Consider the following dataset. We have 3 Products named Cricket Ball, Football, and Tennis Ball, and their Sales value across 3 months, January, ...

How to Use Excel VBA to Import a CSV File without Opening (3 Methods)

To illustrate the methods, we will use the following CSV file. The file consists of three columns: Salesman, Product, and Sales. We will import the ...

VBA to Split String into Multiple Columns in Excel (2 Ways)

Method 1 - Embed VBA to Split a String into Multiple Columns in Excel We have one long string, John Cena,23/04/1977,Wrestler,USA in a worksheet ...

How to Generate a Word Document from an Excel Macro: 10 Methods

⧪ Method 1 - Setting the Necessary Objects At the very outset of the code, we have to set the necessary objects required in this code. A Word ...

How to Transpose Rows to Columns Using Excel VBA (4 Examples)

Dataset Overview To illustrate the process of transposing rows to columns in Excel using VBA, we’ll work with a dataset representing the marks ...

How to Import a Text File to Excel Using VBA (3 Easy Methods)

Below, we have a dataset in a comma-separated text file. The dataset represents sale details for a shop. Each piece of data is separated by a comma. ...

Using VBA to Hide Rows Based on Cell Value in Excel – 14 Examples

This is the sample dataset.   Example 1. Embed VBA to Hide Rows Based on Cell Text Value in Excel To hide the row that contains ...

Print to PDF Using Macro Button in Excel (5 Macro Variants)

For this tutorial, we'll assume you have an Excel Worksheet titled Customer Name and Info, and you want to print the worksheet using the Macro ...

How to Read a CSV File Line by Line Using Excel VBA (3 Methods)

Dataset Overview To illustrate, we will use a sample dataset as an example. The below dataset within a CSV file represents the Salesman, Product, ...

Excel VBA to Convert CSV File to XLSX (2 Easy Examples)

We will use a CSV file that contains information about the Name, ID, and Date of Birth of some employees. We will convert this CSV file to an XLSX ...

How to Export PDF with Fit to Page Using VBA (3 Methods)

Dataset Overview Let’s start by introducing our dataset, which represents sales for a salesperson over 12 months for the years 2010 to 2015. ...

How to Hide Rows Based on Criteria with VBA in Excel: 15 Suitable Methods

Method 1 - Embed VBA to Hide a Single Row in Excel Steps: Press Alt + F11 on your keyboard or go to the tab Developer -> Visual Basic to ...

How to Extract Specific Data from PDF to Excel Using VBA

  Extract Specific Data from PDF to Excel Using VBA (Code) Sub Extract_Data_from_PDF() Set MyWorksheet = ...

How to Save an Active Sheet as a PDF with a Filename from Cell Value Using Macro in Excel

Writing Code in Visual Basic Editor Steps: Go to the Developer tab from the Excel Ribbon. Click the Visual Basic option. In the ...

Print a Cell Range to PDF with VBA in Excel (5 Easy Methods)

Suppose you have the following dataset. Method 1 - Define a Range to Print to PDF and use a Cell Value as the PDF Name Steps: Decide ...

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo