Table of Contents

CurrentRegion

This example illustrates the CurrentRegion property in Excel VBA. The current region is a range bounded by any combination of blank rows and blank columns. Can you find the current region of cell A1?

Can you find the current region of cell A1?

Place a command button on your worksheet and add the following code line:

Range(“A1”).CurrentRegion.Select

Result when you click the command button on the sheet:

Current region of cell A1

Here is another example. Can you find the current region of cell B3?

Can you find the current region of cell B3?

Code:

Range(“B3”).CurrentRegion.Select

Result:

Current region of cell B3

The value 1 in row 1 has no influence on the current region of cell B3. Row 2 is empty!

Leave A Comment

Excel meets AI – Boost your productivity like never before!

At Formulas HQ, we’ve harnessed the brilliance of AI to turbocharge your Spreadsheet mastery. Say goodbye to the days of grappling with complex formulas, VBA code, and scripts. We’re here to make your work smarter, not harder.

Related Articles

The Latest on Formulas HQ Blog