Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Excel syntax for "offset" statement
Hi, I've been trying without success to figure out how to do this: I
have an OFFSET statement containing a reference to a different sheet, and I cannot get it to work. It would have to be something like OFFSET( worksheet3!lines, 5). I cannot write the "worksheet3!lines" reference in a way that will work. Can someone please point out how to do this? Many thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Excel syntax for "offset" statement
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 wrote in message ups.com... Hi, I've been trying without success to figure out how to do this: I have an OFFSET statement containing a reference to a different sheet, and I cannot get it to work. It would have to be something like OFFSET( worksheet3!lines, 5). I cannot write the "worksheet3!lines" reference in a way that will work. Can someone please point out how to do this? Many thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Excel syntax for "offset" statement
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 wrote in message ups.com... Hi, I've been trying without success to figure out how to do this: I have an OFFSET statement containing a reference to a different sheet, and I cannot get it to work. It would have to be something like OFFSET( worksheet3!lines, 5). I cannot write the "worksheet3!lines" reference in a way that will work. Can someone please point out how to do this? Many thanks. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Excel syntax for "offset" statement
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)... As I have it, "lines" is just a name assigned a number in worksheet3. Say "lines" is 3. Then I want the statement OFFSET ("lines",4) to mean OFFSET(3,4). I just can't come up with the correct syntax for the "lines" argument. Thanks for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
correct syntax for nesting "if", "and", and "vlookup"....if possib | Excel Worksheet Functions | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
How do I use "offset" function in "array formula"? | Excel Discussion (Misc queries) | |||
Syntax to "OR" 3 "ISERROR" conditions | Excel Worksheet Functions | |||
what is syntax for if(between range of dates,"Q1","Q2")? | Excel Worksheet Functions |