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

Excel VBA: Open Word Document and Paste (3 Suitable Examples)

This article illustrates how to open a new or existing word document from Excel and paste data into it using VBA with 3 different examples. We’ll use ...

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

How to Apply Macro to Convert Multiple Excel Files to CSV Files

One of the common problems that most of us face in our daily lives while working with Macro in Excel is how to convert multiple Excel files to CSV ...

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

Excel VBA: Import Comma Delimited Text File (2 Cases)

Excel offers some cool features to import txt, csv, etc. files in the worksheet. Suppose, we have a sample text file containing Text and commas as ...

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

Excel VBA: Read Text File into String (4 Effective Cases)

If you are looking for ways to read text file into a string using VBA, then this article will be helpful for you. So, let’s start with our main ...

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

Close the CTA

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo