ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Target Offset? (https://www.excelbanter.com/excel-programming/272754-target-offset.html)

Otto Moehrbach[_3_]

Target Offset?
 
Excel 2002, Win XP
Chip Pearson responded to a poster with a Worksheet_Change event macro that
included the line:
Target(1, 4).Value = Now
The Target(1,4) term is new to me. I played with it and it acts like an
Offset of (0,3).
What does the (1,4) in Target(1,4) mean? Thanks for your help. Otto



keepITcool

Target Offset?
 
It's short coding for item/cells property of the range collection...


Range("b2")= Range("a1")(2,2)=[a1].offset(1,1)


Lotsa ways to refer to a cell :)




keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Otto Moehrbach" wrote:

Excel 2002, Win XP
Chip Pearson responded to a poster with a Worksheet_Change event macro
that included the line:
Target(1, 4).Value = Now
The Target(1,4) term is new to me. I played with it and it acts like
an Offset of (0,3).
What does the (1,4) in Target(1,4) mean? Thanks for your help. Otto





D. A. Gray

Target Offset?
 
Though I didn't see the original message, my guess is that
Target is the name of a Range object. In any case, your
guess is correct, since cell references are 1 based,
rather than zero based, as are the underlying arrays.

David Gray
P6 Consulting
http://www.p6c.com

You are more important than any technology we may employ.



-----Original Message-----
Excel 2002, Win XP
Chip Pearson responded to a poster with a

Worksheet_Change event macro that
included the line:
Target(1, 4).Value = Now
The Target(1,4) term is new to me. I played with it and

it acts like an
Offset of (0,3).
What does the (1,4) in Target(1,4) mean? Thanks for your

help. Otto


.


J.E. McGimpsey

Target Offset?
 
Chip's site has a good explanation of the Item method by Alan Beban:

http://www.cpearson.com/excel/cells.htm

In article ,
"D. A. Gray" wrote:

Though I didn't see the original message, my guess is that
Target is the name of a Range object. In any case, your
guess is correct, since cell references are 1 based,
rather than zero based, as are the underlying arrays.



All times are GMT +1. The time now is 12:06 PM.

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