Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Is it possible to offset a worksheet reference?

I have a workbook with n worksheets. I would like to sum the cells from
Sheet2 to Sheet(n-1). The names of sheets 1 and n are static, but names on
other sheets change. Is there any way to do a 3D reference with an offset in
the worksheet specifier, so that the formula works regardless of the number
or names of the worksheets in the middle? Something like
=SUM(('Sheet1'+1):('SheetN'-1)!O4)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Is it possible to offset a worksheet reference?

One way:

Put a dummy/blank worksheet after Sheet1 and another one before SheetN,
perhaps named "Start" and "End". Use the formula

=SUM('Start:End'!O4)

put as many sheets in the middle as you like. You can hide the dummy
sheets if you like.


In article ,
pfrieder wrote:

I have a workbook with n worksheets. I would like to sum the cells from
Sheet2 to Sheet(n-1). The names of sheets 1 and n are static, but names on
other sheets change. Is there any way to do a 3D reference with an offset in
the worksheet specifier, so that the formula works regardless of the number
or names of the worksheets in the middle? Something like
=SUM(('Sheet1'+1):('SheetN'-1)!O4)

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Is it possible to offset a worksheet reference?

Hi,

You could use something like this:

=SUM(Sheet1:SheetN!O4)-Sheet1!O4-SheetN!O4

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"pfrieder" wrote:

I have a workbook with n worksheets. I would like to sum the cells from
Sheet2 to Sheet(n-1). The names of sheets 1 and n are static, but names on
other sheets change. Is there any way to do a 3D reference with an offset in
the worksheet specifier, so that the formula works regardless of the number
or names of the worksheets in the middle? Something like
=SUM(('Sheet1'+1):('SheetN'-1)!O4)

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Is it possible to offset a worksheet reference?

Thanks, this is a good suggestion. In my case, however, SheetN is where the
summation is located so this approach would produce a circular reference. I
still wonder if there is any mechanism that actually offsets a worksheet
reference, or if I am stuck with using a work-around.

"Shane Devenshire" wrote:

Hi,

You could use something like this:

=SUM(Sheet1:SheetN!O4)-Sheet1!O4-SheetN!O4

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"pfrieder" wrote:

I have a workbook with n worksheets. I would like to sum the cells from
Sheet2 to Sheet(n-1). The names of sheets 1 and n are static, but names on
other sheets change. Is there any way to do a 3D reference with an offset in
the worksheet specifier, so that the formula works regardless of the number
or names of the worksheets in the middle? Something like
=SUM(('Sheet1'+1):('SheetN'-1)!O4)

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Is it possible to offset a worksheet reference?

Thanks, this will work for my current effort. I wonder, though, if Excel has
any mechanism to offset a worksheet reference in a function call. One can
achieve something similar in VB, e.g.

lastSht = Sheets("All Tasks").Index - 1

You can use offsets to reference a cell or range, doesn't seem like much of
a stretch to extend the concept to worksheets.

"JE McGimpsey" wrote:

One way:

Put a dummy/blank worksheet after Sheet1 and another one before SheetN,
perhaps named "Start" and "End". Use the formula

=SUM('Start:End'!O4)

put as many sheets in the middle as you like. You can hide the dummy
sheets if you like.


In article ,
pfrieder wrote:

I have a workbook with n worksheets. I would like to sum the cells from
Sheet2 to Sheet(n-1). The names of sheets 1 and n are static, but names on
other sheets change. Is there any way to do a 3D reference with an offset in
the worksheet specifier, so that the formula works regardless of the number
or names of the worksheets in the middle? Something like
=SUM(('Sheet1'+1):('SheetN'-1)!O4)




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Is it possible to offset a worksheet reference?

No, XL doesn't have that functionality (I would probably have used it if
it did...).

XL's 3-D capability is very limited. And VBA's is non-existent.

In article ,
pfrieder wrote:

Thanks, this will work for my current effort. I wonder, though, if Excel has
any mechanism to offset a worksheet reference in a function call. One can
achieve something similar in VB, e.g.

lastSht = Sheets("All Tasks").Index - 1

You can use offsets to reference a cell or range, doesn't seem like much of
a stretch to extend the concept to worksheets.

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
offset reference shashidhar Excel Worksheet Functions 1 March 23rd 08 09:33 PM
Circular Reference / OFFSET nastech Excel Discussion (Misc queries) 3 September 30th 07 10:43 PM
Using an offset formula for the reference in a relative reference Cuda Excel Worksheet Functions 6 November 15th 06 05:12 PM
How to reference an offset from a cell? poddys Excel Worksheet Functions 3 March 10th 06 08:24 PM
Can the offset worksheet function reference another worksheet AlistairJ Excel Worksheet Functions 2 May 9th 05 06:18 PM


All times are GMT +1. The time now is 01:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"