ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ActiveCell.Row in Range().Select? (https://www.excelbanter.com/excel-programming/370871-activecell-row-range-select.html)

thebluerider

ActiveCell.Row in Range().Select?
 

I got a scipt containing this code:

Code
-------------------
Range("H22:K22").Selec
-------------------


Now I'd like make the row numer "22" dependant on the active cell.

So something like this (just explanatory, since the following code i
not working ofc):

Code
-------------------
Range("HActiveCell.Row:KActiveCell.Row").Selec
-------------------


Can anyone show me how to accomplish that

--
theblueride
-----------------------------------------------------------------------
thebluerider's Profile: http://www.excelforum.com/member.php...fo&userid=3775
View this thread: http://www.excelforum.com/showthread.php?threadid=57336


Ron de Bruin

ActiveCell.Row in Range().Select?
 
One way

Cells(ActiveCell.Row, 1).Range("H1:K1").Select
It always select the cells from H:K in the activecell row

Or use
Range("H" & ActiveCell.Row & ":K" & ActiveCell.Row).Select



--
Regards Ron de Bruin
http://www.rondebruin.nl



"thebluerider" wrote in message
news:thebluerider.2cs8fe_1155982805.9137@excelforu m-nospam.com...

I got a scipt containing this code:

Code:
--------------------
Range("H22:K22").Select
--------------------


Now I'd like make the row numer "22" dependant on the active cell.

So something like this (just explanatory, since the following code is
not working ofc):

Code:
--------------------
Range("HActiveCell.Row:KActiveCell.Row").Select
--------------------


Can anyone show me how to accomplish that?


--
thebluerider
------------------------------------------------------------------------
thebluerider's Profile: http://www.excelforum.com/member.php...o&userid=37754
View this thread: http://www.excelforum.com/showthread...hreadid=573367





All times are GMT +1. The time now is 08:56 AM.

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