ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select a range... (https://www.excelbanter.com/excel-programming/365483-select-range.html)

derobin

Select a range...
 
Hi,

I just want to select a one-column-range starting at the selected cell
and stretching out until a row specified in variable x.
There has to be a better way than this:

Range(ActiveCell.Address & ":" & Left(Replace(ActiveCell.Address, "$",
""), 1) & x).Select

What am I missing?

Thx
Robin


Kaak[_70_]

Select a range...
 

Sub Test()

Dim x As Integer

x = 8

Range(ActiveCell.Address).Resize(x, 1).Select

End Sub


--
Kaak
------------------------------------------------------------------------
Kaak's Profile: http://www.excelforum.com/member.php...fo&userid=7513
View this thread: http://www.excelforum.com/showthread...hreadid=555928


Ardus Petus

Select a range...
 
Activecell.resize(x,1).Select

HTH
--
AP

"Kaak" a écrit dans le
message de news: ...

Sub Test()

Dim x As Integer

x = 8

Range(ActiveCell.Address).Resize(x, 1).Select

End Sub


--
Kaak
------------------------------------------------------------------------
Kaak's Profile:
http://www.excelforum.com/member.php...fo&userid=7513
View this thread: http://www.excelforum.com/showthread...hreadid=555928




QuickLearner[_15_]

Select a range...
 

Is it possible to have a column of multiple values and by clicking i
the cell, it filters on that value

--
QuickLearne
-----------------------------------------------------------------------
QuickLearner's Profile: http://www.excelforum.com/member.php...fo&userid=3548
View this thread: http://www.excelforum.com/showthread.php?threadid=55592



All times are GMT +1. The time now is 09:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com