LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Select Range in VBA relative to another cell


HOpefully quick question.

I have code that looks to see if a block of cells meets my criteria.
If it does, then I need to perform some operations on that block.
Everything is in 1 column (Col A) if that helps.

What my code does it to first identify a block of rows in Column
where 6 consecutive rows are non-blank. I need to copy the bottom fiv
rows of this block and transpose them in column B, on the same row tha
starts the block.

When I hard code cell references, it works fine. My problem is that
can not hard code cell references for the entire procedure, becuaus
rows will be deleted. My long winded question is as follows:

How can I set the Range(Cells(8,1),Cells(12,1).select to be define
dynamically relative to the active cell (the first cell of the block)?

Thanks in advance,

Broc

--
Btiber
-----------------------------------------------------------------------
Btibert's Profile: http://www.excelforum.com/member.php...nfo&userid=855
View this thread: http://www.excelforum.com/showthread.php?threadid=52975

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
refer to cell relative to range Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 9 October 26th 07 03:03 PM
Return the row number of a cell relative to a range Frederick Chow Excel Programming 3 August 29th 05 09:33 PM
How to Select a relative range with Using "Find" and Offset() Dennis Excel Discussion (Misc queries) 7 July 27th 05 03:57 PM
Macro to capture cell value then use it for a relative range selec PZ Straube Excel Programming 8 June 13th 05 08:28 AM
Using Relative Addresses to Select Columns Andrew Rallings Excel Programming 1 August 13th 03 01:28 AM


All times are GMT +1. The time now is 10:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"