Macros & Excel VBA

Excel VBA to Convert Date and Time to Date Only

It often becomes necessary to convert a range of dates and times to dates only. We can use Excel VBA to convert date and time to date only. This ...

How to Convert String to Number in Excel VBA (3 Methods)

Method 1 - Convert String to Number Using Type Conversion Functions Excel provides several built-in type conversion functions. We can use them in ...

How to Convert String to Long Using VBA in Excel (3 Ways)

You'll learn how to convert Strings to Long in this VBA tutorial. This VBA tutorial comes with an Excel worksheet that contains all of the macros, ...

Macro to Concatenate Multiple Columns in Excel (with UDF and UserForm)

While working with VBA in Excel, we often have to develop Macro (s) to concatenate multiple columns in a worksheet. Concatenating columns is widely ...

How to Convert String to Double in Excel VBA (5 Methods)

  What is the CDbl Function? The VBA CDbl function converts an expression to a double. You'll see the following scenario if you insert the ...

How to Use Time Format in Excel VBA (Macro, UDF, and UserForm)

In this article, I’ll show you how you can use the time format in VBA in Excel. You’ll learn to display the time, as well as the date, in any desired ...

Calculate Percentage in Excel VBA (Involving Macro, UDF, and UserForm)

  Code Overview for Calculating the Percentages via VBA Sub Calculate_Percentage() Dim Value1 As Variant Value1 = Range("D4").Value Dim ...

Excel VBA: If Cell Contains Value Then Return a Specified Output

In the sample dataset of examination record for Sunflower Kindergarten school, the blank cells mean that the student was absent for that particular ...

VBA to Customize Row Height in Excel (6 Methods)

In this article, we will show you how to customize row height in Excel with a VBA macro, including how to set new row heights, change row height for ...

VBA to Hide Rows in Excel (14 Methods)

In this article, we will discuss 14 different methods to hide rows in Excel based on different criteria utilizing the VBA macro. The sample ...

How to Freeze Panes with VBA in Excel (5 Ways)

  Sub Freeze_Panes_Row_and_Column() Range("C4").Select ActiveWindow.FreezePanes = True End Sub Method 1 - Freezing a Row with ...

VBA to Merge Cells in Excel (9 Methods)

In Excel, to merge multiple cells or ranges into one singular cell using VBA, the Range.Merge method is used. Range.Merge Method in Excel ...

Print to PDF in Excel VBA with the ExportAsFixedFormat Statement: 5 Examples

Method 1 - Print to PDF in Excel VBA with No Name or Path Specified We have a worksheet with the book records of a bookshop called Marin Bookstore. ...

How to Use VBA Space Function in Excel (3 Examples)

In this tutorial, I will explain the details of the excel VBA Space function along with some examples. This function can only be used in VBA code. ...

How to Generate Random Number with Excel VBA (4 Examples)

By using the built-in Rnd function in VBA Excel, we can generate a random number easily. These generated random numbers are usually in the range of 0 ...

Close the CTA

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo