ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA - Select: current cell + next 19 cells (down in column) = rang (https://www.excelbanter.com/excel-programming/419672-vba-select-current-cell-next-19-cells-down-column-%3D-rang.html)

Chris T-M

VBA - Select: current cell + next 19 cells (down in column) = rang
 
I have a variable cell location I am finding using the following:

'Find 'Released' Header Row
Dim CrntF As Range
Set CrntF = Range("F49")

Do Until ActiveCell = "RELEASED"
On Error Resume Next

CrntF.Select
Set CrntF = ActiveCell.Offset(1, 0)
Loop

'Move down to 1st project, and over to Title
CrntF.Offset(1, 8).Select

This selects the correct starting cell, but I need to copy this cell & the
next 19 cells below it.

I hope this is simple. Thanks in advance for any help.

Gary Keramidas

VBA - Select: current cell + next 19 cells (down in column) = rang
 
not sure what you want, but you can try this (untested)

CrntF.Offset(1, 8).resize(19).Select

--


Gary

"Chris T-M" wrote in message
...
I have a variable cell location I am finding using the following:

'Find 'Released' Header Row
Dim CrntF As Range
Set CrntF = Range("F49")

Do Until ActiveCell = "RELEASED"
On Error Resume Next

CrntF.Select
Set CrntF = ActiveCell.Offset(1, 0)
Loop

'Move down to 1st project, and over to Title
CrntF.Offset(1, 8).Select

This selects the correct starting cell, but I need to copy this cell & the
next 19 cells below it.

I hope this is simple. Thanks in advance for any help.




mudraker[_405_]

VBA - Select: current cell + next 19 cells (down in column) = rang
 

Try this version

Dim CrntF As Range

Set CrntF = Range("f49:f" & Rows.Count).Find(what:="RELEASED")
If Not CrntF Is Nothing Then
CrntF.Offset(2, 8).Resize(19).Select
End If


--
mudraker
------------------------------------------------------------------------
mudraker's Profile: http://www.thecodecage.com/forumz/member.php?userid=18
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=26432



All times are GMT +1. The time now is 10:03 PM.

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