View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
[email protected] programmernovice@yahoo.com is offline
external usenet poster
 
Posts: 21
Default VB Excel syntax for "offset" statement


Charlie wrote:
The Range statement also allows the sheet reference to be embedded in the
string

Range("Sheet1!a3").Value = Range("Sheet2!a1").Offset(1, 1).Value

(note that you will need to enclose the sheet name in apostrophes if it
contains spaces or special character: e.g. "'Sheet Name'!A1")


"NickHK" wrote:

You can't OFFSET over different worksheets, if that's what you are trying to
do.
Is "lines" a named range on worksheet3 ?

Does this what you need ?
worksheet3.Range("lines").Offset(0,5)...

NickHK

Many thanks to everyone who replied.