Macros & Excel VBA

How to Format Date with VBA in Excel (4 Methods)

In the dataset, the same dates are in Columns B and C. We will format the date in Column C. Method 1 – Using VBA to Format Dates Steps: ...

Date Variable in VBA Codes (7 Uses of Macros with Examples)

Date Variable Format Requirements A date constant can be declared within hash signs (# #). It accepts two formats: m/d/yyyy - for example, ...

How to Get the Current Date in VBA – 3 Methods

  Quick View: Method 1 - Getting the Current Date using the Date Function of VBA This is the code: Current_Date=Date() ...

How to Use VBA DateValue Function in Excel (6 Examples)

Basics of VBA DateValue Function: Summary & Syntax Summary The Excel VBA DateValue function takes a value or an argument in string ...

How to Convert Date from a String Using VBA – 7 Methods

This is the sample dataset. Method 1 - Using VBA to Convert Date to a Text String Step 1:  Go to Developer Tab >> Visual Basic ...

How to Switch Rows and Columns in Excel (5 Methods)

The dataset below shows the market share of smartphone companies. Method 1 – Using the Paste Special (Transpose) Steps: Select the ...

How to Call a Sub in VBA in Excel (4 Examples)

Example 1 - Call a Sub without Arguments from Another Sub in VBA in Excel We will call a Sub without any argument from another Sub in VBA. Sub1 ...

How to Convert Range to Array in Excel VBA (3 Ways)

Below is a dataset with the names of students and their marks in Physics, Chemistry, and Mathematics at Sunflower Kindergarten. Method 1 - ...

Excel Formula to Change Text Color Based on Value: 3 Ways

Method 1 - Using ISODD Function Steps: Select the column where you want to change the text color. Go to the Home tab. Select the New Rule ...

How to Use ColorIndex in Excel VBA (4 Examples)

Excel VBA ColorIndex Codes Check out the picture below for the ColorIndex of all the colors available in Excel VBA. Here’s a dataset with ...

How to Add Characters in Excel (with Formula, Flash Fill & VBA)

Here's an overview of a method where characters are added using Flash Fill. Download the Practice Workbook Add Characters.xlsm ...

How to Use the VLOOKUP Function in Excel VBA – 4 Examples

Quick View: Sub VLOOKUP_with_User_Defined_Lookup_Value() Book = InputBox("Enter the Name of the Book: ") Set Rng = Range("B4:D13") MsgBox ...

Change Font Color Based on Value of Another Cell in Excel

In this tutorial, we will demonstrate how to change font color based on the value of another cell. Here is an overview of the process. To ...

How to Change Text Color with Formula in Excel (2 Methods)

We have some book names and their online prices for two consecutive years. We’ll change the color of the prices with the formula. Method 1 ...

Excel VBA: Select Multiple Columns (3 Methods)

It's simple enough to select multiple columns manually in Excel. But it's also a simple task using VBA codes. Select Single Column Using ...

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo