Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
lawhesl
 
Posts: n/a
Default How can I sum a cell in multiple worksheets as new ones are created.


I use a worksheet template to track stock trades and create a new
worksheet for each trade. I would like to sum the same cell on each
worksheet. How do I automatically add a new worksheets cell to the sum
of the existing worksheets??

Thanks


--
lawhesl
------------------------------------------------------------------------
lawhesl's Profile: http://www.excelforum.com/member.php...o&userid=16798
View this thread: http://www.excelforum.com/showthread...hreadid=319978

  #2   Report Post  
duane
 
Posts: n/a
Default


if you insert the new worksheet in between the "range" of summed
worksheets it should be picked up in the sum


--
duane


------------------------------------------------------------------------
duane's Profile: http://www.excelforum.com/member.php...o&userid=11624
View this thread: http://www.excelforum.com/showthread...hreadid=319978

  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

Copy/paste this UDF to your workbook.

Function PrevSheet(rg As Range)
'Enter =PrevSheet(B2) on sheet2 and you'll get B2 from sheet1.
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

In a cell on your new worksheet, say A1, enter =PrevSheet(B2)

A1 on each sheet will refer to B2 on the previous sheet.

You could open a new workbook and delete all but one sheet.

Enter the formula in A1.

Save this book as Save As type Template(*.xlt)

Name it SHEET(Excel will add the .xlt extension.

Store SHEET.XLT in your XLSTART folder.

It will become the default new sheet when you InsertWorksheet.

Gord Dibben Excel MVP

On Tue, 23 Nov 2004 21:43:50 -0600, lawhesl
wrote:


I use a worksheet template to track stock trades and create a new
worksheet for each trade. I would like to sum the same cell on each
worksheet. How do I automatically add a new worksheets cell to the sum
of the existing worksheets??

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
Print all charts in a workbook (multiple worksheets) aewsaws Charts and Charting in Excel 4 May 12th 23 03:45 AM
fill a particular cell on a series of worksheets from a lookup tab br549 Excel Discussion (Misc queries) 1 January 7th 05 12:42 AM
use multiple worksheets Mike In Norcross Excel Discussion (Misc queries) 2 December 28th 04 12:09 AM
HOW DO I REFERENCE A CELL FROM THE RESULTS OF TWO WORKSHEETS TD Excel Discussion (Misc queries) 1 December 14th 04 03:16 PM
search multiple worksheets for an item and return the Wsheets name Chris Excel Worksheet Functions 16 November 7th 04 12:15 PM


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