HomeMicrosoft OfficeExcelHow to Resize Column & Row in Excel VBA?

How to Resize Column & Row in Excel VBA?

In this post, you’ll learn how to resize column and rows in your Excel spreadsheet using Excel VBA.

Resize Property

The Resize Property of the Range Object will return a new range resized from the original Range object.

Syntax

The syntax for the Resize property

Range("A1").Resize (RowSize, ColumnSize)

Note: RowSize and ColumnSize must be greater than zero.

Resize Number of Rows and Columns

To resize column and row in Excel VBA

Code:

Range("A1:D5").Resize(5, 5).Select

Resize Number Of Rows Only

To resize number of Rows alone,

Code:

  Range("A1").Resize(10).Select

Resize Number Of Columns Only

To resize the number of Columns alone

Code:

Range("A1").Resize(, 5).Select

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this article, you will learn about the SKEW.P function, the formula syntax and usage of the function in Microsoft...
In this article, you will learn about the SKEW function, the formula syntax and usage of the function in Microsoft...
In this article, you will learn about the RANK.EQ function, the formula syntax and usage of the function in Microsoft...
  • Excel
  • November 23, 2021