From the course: Excel VBA: Managing Files and Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Select the active region

Select the active region - Microsoft Excel Tutorial

From the course: Excel VBA: Managing Files and Data

Start my 1-month free trial

Select the active region

- I wanted to lead off this chapter by showing you a technique that is useful whether you are interacting with Excel using a keyboard and mouse or through VBA. And that technique is to select the current region. The sample file that I'll work in is 0101 Current Region, and that is a macro-enabled workbook that you can find in the chapter 1 folder of the exercise files collection. This worksheet contains a list, and I have sales data by year for a variety of states. You'll notice that the data all appears in a contiguous region. That is, there are no blank rows and also there are no blank columns. The boundaries, in other words, are very clearly defined for this data set. If you've ever created an Excel table, then you might've noticed that you click a cell inside of a region, for example, I could click cell B6 here, but it could be any of them, and then when you start to create the table, So I'll go on the home…

Contents