Macros & Excel VBA

How to Sort Array with Excel VBA (Both Ascending and Descending Order)

Method 1 - Sort Array A-Z (In Ascending Order) in Excel VBA Convert the selected range from an Excel worksheet into an array. Dim MyArray As ...

Filter Multiple Criteria in Excel with VBA: 2 Easy Methods 

Method 1 - Filter Multiple Criteria of AND Type in Excel with VBA Develop a Macro to filter multiple criteria of AND type for any data set. ...

How to Use VBA MkDir Function in Excel (4 Examples)

We’ll first discuss how to write code in the Visual Basic Editor. Follow the simple steps to create the setup for writing your code. Steps: ...

How to Remove a Header in Excel – 4 Methods

The header in the sample dataset is Product Order Records. Method 1 - Using the Page Setup to Remove a Header in Excel Go to Page ...

How to Use VBA Replace Function in Excel: 11 Methods

Method 1 - Use VBA Replace to Find a Word and Replace We have the following dataset of six students and their status of present or absent in the ...

How to Use the VBA Weekday Function (2 Suitable Examples)

In this article, we'll explain how to use the VBA Weekday function in Excel. VBA Weekday Function (Quick View) Running this code will ...

How to Use the VBA Mod Operator – 9 Examples

This is an overview.   Download to Practice Examples of VBA Mod Operator.xlsm The VBA Mod Function Summary The VBA ...

VBA Format Function in Excel: 8 Uses with Methods

Method 1 - VBA to Format Numbers with Predefined Formats Below is the VBA code which covers all the predefined formats to Format numbers in Excel. ...

How to replace the Text of a Cell Based on a Condition in Excel – 5 Methods

Method 1 - Replacing Text using the Find and Replace Tool in Excel This is the sample dataset. Step 1: Go to the Home tab. Click ...

How to Use VBA Case Statement (13 Examples)

The CASE statement is a logical function, which can be used instead of the IF-THEN-ELSE statement. VBA Case Statement: Syntax & Arguments ...

VBA Date Function (13 Uses of Macros with Examples)

Download Practice Workbook Uses of VBA Date.xlsm Function 1 - DateAdd Function as Date in VBA In VBA, we use the DateAdd function to ...

How to Use Reference from Another Excel Workbook Without Opening it – 5 Examples

Example 1 - Use a Reference from Another Workbook Using the Paste Link Option Step 1: Open the worksheet: Closed.xlsm. Copy B5:C9. ...

How to Use VBA InStrRev Function (7 Suitable Examples)

When you need to find the position of a character inside a string or the occurrence of a substring inside a string, the VBA InStrRev function might ...

How to Use VBA in an Excel Table – 9 Methods

This dataset showcases a table with headers. Method 1 - Creating a Table with VBA in Excel Declare the Table as a ListObject. ...

How to Format a Number with VBA in Excel (4 Methods)

In the below dataset, we have the same numbers in Columns B and C.  Method 1 – Using VBA NumberFormat Property Steps: Press Alt + ...

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo