Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Is Range Offset property needed

Yesterday, I found something by accident.
I meant to access the cell above ActiveCell as ActiveCell.Offset(-1, 0).
Instead, I referred to ActiveCell(-1, 0) which seemed to refer to
ActiveCell.Offset(-2, -1).

I thought and concluded ActiveCell is equivalent to ActiveCell(1, 1).

I can now refer to the cell above the current cell as ActiveCell(0, 1).
Is this general?
--
Walter Briscoe
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Is Range Offset property needed

Walter Briscoe wrote :
Yesterday, I found something by accident.
I meant to access the cell above ActiveCell as ActiveCell.Offset(-1, 0).
Instead, I referred to ActiveCell(-1, 0) which seemed to refer to
ActiveCell.Offset(-2, -1).

I thought and concluded ActiveCell is equivalent to ActiveCell(1, 1).

I can now refer to the cell above the current cell as ActiveCell(0, 1).
Is this general?


I like to create a fully relative locally defined name "LastCell" so it
will always refer to the cell above the cell using it in a formula.
This is great for cases where calcs change whenever rows are
added/removed, making the formulas somewhat dynamic.

Others I like to use a

LeftCell,RightCell,LastLeftCell,LastRightCell
NextCell (cell below)
NextLeftCell,NextRightCell

These provide enclosing the active cell in the center of a 9 cell grid.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Reply
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
Help with OFFSET statement needed tom Excel Worksheet Functions 2 August 28th 06 07:38 PM
Range - Offset (Major help needed) VBA Noob[_14_] Excel Programming 0 June 22nd 06 05:58 PM
Range Select with ActiveCell and Offset property AJ Master[_9_] Excel Programming 2 June 20th 06 11:26 PM
offset property to define range Art[_5_] Excel Programming 2 October 24th 03 08:31 PM
Re : MS Excel’s Offset Property TKT-Tang Excel Programming 2 July 10th 03 03:57 AM


All times are GMT +1. The time now is 07:49 PM.

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"