Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default Multiple Worksheet

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.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
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.


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
plot graph from multiple worksheet as embedded chart object on every worksheet [email protected] Charts and Charting in Excel 3 August 24th 06 07:26 PM
plot graph from multiple worksheet as embedded chart object on every worksheet [email protected] Excel Discussion (Misc queries) 2 August 24th 06 05:26 PM
plot graph from multiple worksheet as embedded chart object on every worksheet [email protected] Excel Worksheet Functions 2 August 24th 06 05:26 PM
plot graph from multiple worksheet as embedded chart object on every worksheet jeftiong New Users to Excel 0 August 23rd 06 01:50 PM
Upload multiple text files into 1 excel worksheet + put the filename as the first column in the worksheet Aster Excel Worksheet Functions 3 March 12th 06 09:58 AM


All times are GMT +1. The time now is 02:15 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"