VBA Select Method

Selection is a method in Excel VBA that performs an action. You use the Select method to select a single cell or a range of cells.

As an example, the following macro selects a range on the active worksheet. So, open your Editor Window and type in the following macros:

VBA Select Method
Fig 2.0 Selecting a Group of Cells

You can actually do a lot of stuff with the selected range, like populating or inputting values into the selected group of cells, copying its value, getting the number of the selected cells, adjusting the range size (i.e. increasing or decreasing the Rows and or the Columns).

VBA Select Method
Fig 2.1 Selected Group of Cells

As an example, we will prompt the user to input value of any type, then we will populate a group of cells with the inputted value.

VBA Select Method
Fig 2.2 Macros for the .Select Method
VBA Selection
Fig 2.3 Input Box
Fig. 2.4 Populating a group of Selected Cells

The Select method can also be used to select a single cell.

Leave a Reply

RANK Function

The Excel Rank function returns the numeric value when compared to a list of numeric values. You can rank lists

Read More »
Scroll to Top