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 post, you’ll learn how to Find Blank cells in excel so that you can remove or delete the blank cells form...
In this article, you’ll learn what is a Gauge Chart in Microsoft Excel. Also, you will learn how to add...
Microsoft Excel provides a shortcut for the users to move columns in excel using two different ways – using Shift...