From Active Cell To Last Entry In Excel VBA (In Easy Steps)
Maybe your like
This example illustrates the End property of the Range object in Excel VBA. We will use this property to select the range from the Active Cell to the last entry in a column.
Situation:
Some sales figures in column A. Assume that you will be adding more sales figures over time.

Place a command button on your worksheet and add the following code lines:
1. To select the last entry in a column, simply add the following code line:
Range("A5").End(xlDown).SelectNote: instead of Range("A5"), you can also use Range("A1"), Range("A2"), etc. This code line is equivalent to pressing the END+DOWN ARROW.
Result when you click the command button on the sheet:

2. To select the range from cell A5 to the last entry in the column, add the following code line:
Range(Range("A5"), Range("A5").End(xlDown)).SelectResult when you click the command button on the sheet:
3. To select the range from the Active Cell to the last entry in the column, simply replace Range("A5") with ActiveCell.
Range(ActiveCell, ActiveCell.End(xlDown)).SelectResult when you select cell A2 and click the command button on the sheet:

Note: you can use the constants xlUp, xlToRight and xlToLeft to move in the other directions. This way you can select a range from the Active Cell to the last entry in a row.
Tag » Active Cell Value Vba
-
How To Use ActiveCell In VBA In Excel
-
Working With The Active Cell | Microsoft Docs
-
Application.ActiveCell Property (Excel) - Microsoft Docs
-
Different Examples Of Excel VBA Active Cell - EduCBA
-
VBA Active Cell - WallStreetMojo
-
Get The Active Cell's Column Or Row - VBA Code Examples
-
VBA Cell Value - Get, Set, Or Change - Automate Excel
-
How To Use VBA To Select Range From Active Cell In Excel (3 Methods)
-
ActiveCell Vs Selection VBA For Excel
-
ActiveCell In Excel VBA - When To Use And When It's Downright ...
-
Vba - Get The Current Cell In Excel VB - Stack Overflow
-
Comparing The Active Cell Value To The Value Of The Cell Before It (VBA)
-
Use If, ElseIf And Else With ActiveCell
-
How Do You Code In Excel VBA Without Using Active Cell And Select?