Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Inerting name of current worksheet into fuction

I am a novice to excel and this one is driving me nuts. I am trying to add
the values of a cell across worksheets. I can add the values for all the
worksheets with the following formula:
=SUM(End:Begin!F24) where End is the last sheet and Begin is the first. One
sheet is added daily between the two, and named for the date, ie:03-08-09.
I would like to be able to set up a formula that would add (Sum) the value
of a cell in the current worksheet and the same cells in all of the preceding
worksheets.
Of course I could manually insert the name of the worksheet in the formula
of each new worksheet everyday, ie: =SUM('02-24-09:Begin'!F24), but I would
like to know if there is a way to write it so that the name of the CURRENT
worksheet is populated automatically in the formula. I do have A1 set to
pull the name of the worksheet, ie:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,34).

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Inerting name of current worksheet into fuction

I don't understand what you're trying to do.

If you have this formula:

=SUM(End:Begin!F24)

And you add a new sheet each day and place it between Begin and End the new
sheet will be included in the calculation.

--
Biff
Microsoft Excel MVP


"NHPilot43" wrote in message
...
I am a novice to excel and this one is driving me nuts. I am trying to add
the values of a cell across worksheets. I can add the values for all the
worksheets with the following formula:
=SUM(End:Begin!F24) where End is the last sheet and Begin is the first.
One
sheet is added daily between the two, and named for the date, ie:03-08-09.
I would like to be able to set up a formula that would add (Sum) the value
of a cell in the current worksheet and the same cells in all of the
preceding
worksheets.
Of course I could manually insert the name of the worksheet in the formula
of each new worksheet everyday, ie: =SUM('02-24-09:Begin'!F24), but I
would
like to know if there is a way to write it so that the name of the CURRENT
worksheet is populated automatically in the formula. I do have A1 set to
pull the name of the worksheet, ie:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,34).

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Inerting name of current worksheet into fuction

Yes it does.

However, it calculates the total for ALL the sheets.

What I want to do is have a running total on each sheet that calculates from
the CURRENT worksheet (and not the ones AFTER it) to the first worksheet.

Like I said, I could enter the formula on each sheet, ie:
=SUM('02-24-09:Begin'!F24), and change the formula each day to match the name
of the worksheet, but I would like the formula to be dynamic and populate the
name of the current worksheet automatically into the formula.

"T. Valko" wrote:

I don't understand what you're trying to do.

If you have this formula:

=SUM(End:Begin!F24)

And you add a new sheet each day and place it between Begin and End the new
sheet will be included in the calculation.

--
Biff
Microsoft Excel MVP


"NHPilot43" wrote in message
...
I am a novice to excel and this one is driving me nuts. I am trying to add
the values of a cell across worksheets. I can add the values for all the
worksheets with the following formula:
=SUM(End:Begin!F24) where End is the last sheet and Begin is the first.
One
sheet is added daily between the two, and named for the date, ie:03-08-09.
I would like to be able to set up a formula that would add (Sum) the value
of a cell in the current worksheet and the same cells in all of the
preceding
worksheets.
Of course I could manually insert the name of the worksheet in the formula
of each new worksheet everyday, ie: =SUM('02-24-09:Begin'!F24), but I
would
like to know if there is a way to write it so that the name of the CURRENT
worksheet is populated automatically in the formula. I do have A1 set to
pull the name of the worksheet, ie:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,34).

Thanks!




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Inerting name of current worksheet into fuction

If you're willing to use a User Defined Function.......

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 use......................

Say you have 12 sheets, sheet1 through sheet12...........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, 9 Mar 2009 03:41:00 -0700, NHPilot43
wrote:

Yes it does.

However, it calculates the total for ALL the sheets.

What I want to do is have a running total on each sheet that calculates from
the CURRENT worksheet (and not the ones AFTER it) to the first worksheet.

Like I said, I could enter the formula on each sheet, ie:
=SUM('02-24-09:Begin'!F24), and change the formula each day to match the name
of the worksheet, but I would like the formula to be dynamic and populate the
name of the current worksheet automatically into the formula.

"T. Valko" wrote:

I don't understand what you're trying to do.

If you have this formula:

=SUM(End:Begin!F24)

And you add a new sheet each day and place it between Begin and End the new
sheet will be included in the calculation.

--
Biff
Microsoft Excel MVP


"NHPilot43" wrote in message
...
I am a novice to excel and this one is driving me nuts. I am trying to add
the values of a cell across worksheets. I can add the values for all the
worksheets with the following formula:
=SUM(End:Begin!F24) where End is the last sheet and Begin is the first.
One
sheet is added daily between the two, and named for the date, ie:03-08-09.
I would like to be able to set up a formula that would add (Sum) the value
of a cell in the current worksheet and the same cells in all of the
preceding
worksheets.
Of course I could manually insert the name of the worksheet in the formula
of each new worksheet everyday, ie: =SUM('02-24-09:Begin'!F24), but I
would
like to know if there is a way to write it so that the name of the CURRENT
worksheet is populated automatically in the formula. I do have A1 set to
pull the name of the worksheet, ie:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,34).

Thanks!





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Inerting name of current worksheet into fuction

This won't dynamically update the values in all the sheets if a value in one
sheet (Sell A10 in this instance) is changed.

"Gord Dibben" wrote:

If you're willing to use a User Defined Function.......

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 use......................

Say you have 12 sheets, sheet1 through sheet12...........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, 9 Mar 2009 03:41:00 -0700, NHPilot43
wrote:

Yes it does.

However, it calculates the total for ALL the sheets.

What I want to do is have a running total on each sheet that calculates from
the CURRENT worksheet (and not the ones AFTER it) to the first worksheet.

Like I said, I could enter the formula on each sheet, ie:
=SUM('02-24-09:Begin'!F24), and change the formula each day to match the name
of the worksheet, but I would like the formula to be dynamic and populate the
name of the current worksheet automatically into the formula.

"T. Valko" wrote:

I don't understand what you're trying to do.

If you have this formula:

=SUM(End:Begin!F24)

And you add a new sheet each day and place it between Begin and End the new
sheet will be included in the calculation.

--
Biff
Microsoft Excel MVP


"NHPilot43" wrote in message
...
I am a novice to excel and this one is driving me nuts. I am trying to add
the values of a cell across worksheets. I can add the values for all the
worksheets with the following formula:
=SUM(End:Begin!F24) where End is the last sheet and Begin is the first.
One
sheet is added daily between the two, and named for the date, ie:03-08-09.
I would like to be able to set up a formula that would add (Sum) the value
of a cell in the current worksheet and the same cells in all of the
preceding
worksheets.
Of course I could manually insert the name of the worksheet in the formula
of each new worksheet everyday, ie: =SUM('02-24-09:Begin'!F24), but I
would
like to know if there is a way to write it so that the name of the CURRENT
worksheet is populated automatically in the formula. I do have A1 set to
pull the name of the worksheet, ie:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,34).

Thanks!







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Inerting name of current worksheet into fuction

Don't know what you mean by this.

Change a cell value on which sheet?


Gord Dibben MS Excel MVP

On Mon, 9 Mar 2009 09:21:02 -0700, NHPilot43
wrote:

This won't dynamically update the values in all the sheets if a value in one
sheet (Sell A10 in this instance) is changed.

"Gord Dibben" wrote:

If you're willing to use a User Defined Function.......

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 use......................

Say you have 12 sheets, sheet1 through sheet12...........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, 9 Mar 2009 03:41:00 -0700, NHPilot43
wrote:

Yes it does.

However, it calculates the total for ALL the sheets.

What I want to do is have a running total on each sheet that calculates from
the CURRENT worksheet (and not the ones AFTER it) to the first worksheet.

Like I said, I could enter the formula on each sheet, ie:
=SUM('02-24-09:Begin'!F24), and change the formula each day to match the name
of the worksheet, but I would like the formula to be dynamic and populate the
name of the current worksheet automatically into the formula.

"T. Valko" wrote:

I don't understand what you're trying to do.

If you have this formula:

=SUM(End:Begin!F24)

And you add a new sheet each day and place it between Begin and End the new
sheet will be included in the calculation.

--
Biff
Microsoft Excel MVP


"NHPilot43" wrote in message
...
I am a novice to excel and this one is driving me nuts. I am trying to add
the values of a cell across worksheets. I can add the values for all the
worksheets with the following formula:
=SUM(End:Begin!F24) where End is the last sheet and Begin is the first.
One
sheet is added daily between the two, and named for the date, ie:03-08-09.
I would like to be able to set up a formula that would add (Sum) the value
of a cell in the current worksheet and the same cells in all of the
preceding
worksheets.
Of course I could manually insert the name of the worksheet in the formula
of each new worksheet everyday, ie: =SUM('02-24-09:Begin'!F24), but I
would
like to know if there is a way to write it so that the name of the CURRENT
worksheet is populated automatically in the formula. I do have A1 set to
pull the name of the worksheet, ie:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,34).

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
how to find and unlink current worksheet from old worksheet kmjmail Excel Discussion (Misc queries) 3 January 12th 09 10:52 PM
current worksheet Kevin Excel Discussion (Misc queries) 1 February 27th 08 09:36 AM
'Save current worksheet'; 'Open next worksheet' - two command buttons englishmustard Excel Discussion (Misc queries) 1 April 7th 06 12:54 PM
Updating different worksheet with value on current worksheet AMarie Excel Worksheet Functions 2 October 13th 05 06:16 PM
I want in one worksheet to relatively link to/reference cells in another without changing the format of the current worksheet. [email protected] Excel Discussion (Misc queries) 0 September 22nd 05 04:39 PM


All times are GMT +1. The time now is 12:10 AM.

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

About Us

"It's about Microsoft Excel"