Macros & Excel VBA

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

How to Merge Multiple Sheets into One Sheet with VBA in Excel?

We have a workbook consisting of 3 worksheets, Sheet1, Sheet2, and Sheet3. Each contains the sales record of some products for 3 different weeks. ...

How to List Sheet Name in Excel (5 Methods + VBA)

In this article, we'll discuss various ways to derive a list of sheet names in Excel. Unfortunately, there is no dedicated function to fetch a list ...

Excel VBA to Count Rows with Data: 4 Methods

Method 1 - Count Rows with Data Using Excel VBA in a Whole Sheet Steps: Right-click on the sheet title. Select View Code from the context ...

How to Use Named Range in Excel VBA (2 Ways)

Many a time while working with VBA in Excel, we have to use a Named Range. In this article, I’ll show you how you can create and refer to a Named ...

How to Format a Cell in Excel with VBA (12 Ways)

Method 1 - Format Cell Horizontally or Vertically with VBA Excel’s CellFormat. The AddIndent property sets a Variable type value that indicates ...

VBA COUNTIF Function in Excel: 6 Examples

Method 1 - WorksheetFunction with COUNTIF in Excel VBA Steps: Press Alt + F11 on your keyboard or go to the tab Developer -> Visual Basic to ...

VBA Date to String Conversion in Excel (6 Methods)

Method 1 - Excel FORMAT Function to Convert a Date Range to Strings with VBA Case 1.1 - Change the Whole Date Format in Range Suppose we are using ...

How to Use the Substitute Function in Excel VBA: 3 Methods

Method 1 - Removing the First Character(s) from a String with the Substitute Function in Excel VBA Below is a dataset with the names and IDs of ...

How to Apply the VBA Now and Format Functions in Excel (4 Examples)

VBA Now Function Overview Function Objective The Now function returns the current date and time based on the user’s computer’s default settings. ...

How to Use VBA DATESERIAL Function in Excel (5 Examples)

DATESERIAL function is an Excel time and date function that can be used in VBA to get a date from a specified year, month, and day value. From this ...

How to Use DateDiff Function in Excel VBA (5 Examples)

Microsoft Excel consists of lots of inbuilt functions. This DateDiff function is one of them. This DateDiff function is used in VBA and categorized ...

How to Delete Excel Sheet Using VBA (10 VBA Codes)

Microsoft Excel VBA (Visual Basic for Applications) is such a tool that you can do any operation in Excel using it. We can simply delete sheets ...

How to Use the UsedRange Property of VBA in Excel (4 Ways)

In this article, I’ll show you how you can use the UsedRange property of VBA in Excel. You’ll learn to use the UsedRange property for a closed range, ...

How to Copy and Paste in Excel Using VBA (12 Methods)

Download Practice Workbook You can download the workbooks used to illustrate methods in this article from here. Excel VBA Copy Paste.xlsm ...

Close the CTA

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo