Thread
:
VB Syntax for OFFSET statement
View Single Post
#
4
Posted to microsoft.public.excel.programming
[email protected]
external usenet poster
Posts: 21
VB Syntax for OFFSET statement
Stefano Gatto wrote:
Try
Names("rows").Value
to get 3 out of your name
--
Stefano Gatto
"Jake Marx" wrote:
Hi,
wrote:
Hi, I have defined a name in a worksheet to refer to a number. For
example the name "rows" refers to 3. How can I use the name within an
OFFSET statement in a
VB
macro? I have tried different forms of
OFFSET("rows",7) or OFFSET("=rows",7), or OFFSET(range("rows"),7),
etc. Nothing seems to work.
Range("rows").Value should work fine. But Offset is a method that must be
applied to an object - in this case a Range object. So your code would be
something like this:
MsgBox Range("A10").Offset(Range("rows").Value, 0).Address
Should give you A13.
--
Regards,
Jake Marx
www.longhead.com
[please keep replies in the newsgroup - email address unmonitored]
Thanks, Jake and Stefano,you all are very helpful, that's what I
needed.
Reply With Quote
[email protected]
View Public Profile
Find all posts by
[email protected]