View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Multiple Worksheet

Copy/paste this UDF to a general module in your workbook.

Function PrevSheet(rg As Range)
n = Application.Caller.Parent.Index
If n = 1 Then
PrevSheet = CVErr(xlErrRef)
ElseIf TypeName(Sheets(n - 1)) = "Chart" Then
PrevSheet = CVErr(xlErrNA)
Else
PrevSheet = Sheets(n - 1).Range(rg.Address).Value
End If
End Function

Example of usage...................

Say you have 12 sheets, sheet1 through sheet52...........sheet names don't
matter.

In sheet1 you have a formula in A10 =SUM(A1:A9)

Select second sheet and SHIFT + Click last sheet

In active sheet A10 enter =SUM(PrevSheet(A10),A1:A9)

Ungroup the sheets.

Each A10 will have the sum of the previous sheet's A10 plus the sum of the
current sheet's A1:A9


Gord Dibben MS Excel MVP

On Mon, 16 Feb 2009 09:57:03 -0800, Bearcat Fan <Bearcat
wrote:

I am not sure if this will make sense but I am trying to have worksheets to
connect. I will have 52 worksheets with week 1 and so on. And then in my
worksheets I will have a name and how many hours they are at a certain place
from Monday to Friday. So then in worksheet 2 and so on I want the hours to
add up from week to week on each of the 52 worksheets. If you anyone could
help me that would be great and thanks.