Forum Discussion
Excel 2016 Macro required
- May 29, 2017
Hi Malcolm,
if you were to find last cell in a current range from a selected cell, you can use the following code
Sub JumpToLastCellOfRange()
Selection.End(xlDown).Select
End SubThis assumes, that there are no blanks below the selected cell, otherwise, it will jump to the last non-empty cell before blank cell.
Some examples are also provided in http://www.ozgrid.com/VBA/ExcelRanges.htm
Hope this helps. Please let me know if you require something else.
Yury
Hi Malcolm,
if you were to find last cell in a current range from a selected cell, you can use the following code
Sub JumpToLastCellOfRange()
Selection.End(xlDown).Select
End Sub
This assumes, that there are no blanks below the selected cell, otherwise, it will jump to the last non-empty cell before blank cell.
Some examples are also provided in http://www.ozgrid.com/VBA/ExcelRanges.htm
Hope this helps. Please let me know if you require something else.
Yury
- Malcolm McMasterMay 29, 2017Copper Contributor
Many thanks for your response. Problem solved, works like a charm. Great support !