#1   Report Post  
daolb
 
Posts: n/a
Default totals


I've a workbook with 1 project management sheet and several sheets with
testdata. The project management sheet I use for instance to show total
figures. For example. I want to make totals for sheet1!A1 + sheet2!A1 +
sheet3!A1. As you see the position of the cells remanes the same. Easy
you say....but what I don't know is: how many sheets shall I have, and
I don't want to adapt everytime my formulas after adding a sheet
I there a possibility to say take all the sheets where the name of the
sheet begins with xxx and make a sum of cell A1?

thanks in advance.

david


--
daolb
------------------------------------------------------------------------
daolb's Profile: http://www.excelforum.com/member.php...o&userid=24478
View this thread: http://www.excelforum.com/showthread...hreadid=381509

  #2   Report Post  
mangesh_yadav
 
Posts: n/a
Default


Try:

=SUM(Sheet1:Sheet4!A1)

new sheets inserted should be between these 2 sheets in the formula.

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=381509

  #3   Report Post  
daolb
 
Posts: n/a
Default


this solution is not quite what I want.

for instance

sheet 1: scrn_fun_001 A1: 10
sheet 2: Scrn _use_001 A1: 10
sheet 3: scren_fun_002 A1: 10
sheet 4: scrn_use_002 A1: 10


when I take your solution the total sum is 40, and I want only take
into account sheet1 and 3. You could say reorder the sequence of the
sheets.
Not a good solution, because sheets can be added later on, and I don't
want to adapt my formula.

I would like that the system takes all A1 cells where the sheet name
starts with scrn_fun or scrn_use.

david


--
daolb
------------------------------------------------------------------------
daolb's Profile: http://www.excelforum.com/member.php...o&userid=24478
View this thread: http://www.excelforum.com/showthread...hreadid=381509

  #4   Report Post  
mangesh_yadav
 
Posts: n/a
Default


Here's a small UDF wihch will help you sum the same cell in all the
sheets.

Function mySum(rng)
For Each Sht In Worksheets
mySum = mySum + Sht.Range(rng.Address)
Next
End Function


A small if statement will help you weed out unwanted sheets, for
instance, lets say you have a summary sheet, and don't want to include
this sheet, then you could modify the above udf to:

Function mySum(rng)
For Each sht In Worksheets
If sht.Name < "Summary" Then
mySum = mySum + sht.Range(rng.Address)
End If
Next
End Function


The UDF shold go in a standard module in VBE. Press Alt F11 to open
VBE. Insert Module. And enter the above code.

Usage:
=mysum(A1)
to summ A1 from all sheets.


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=381509

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
Pivot Table Totals Adam New Users to Excel 0 March 25th 05 04:57 PM
Totals For a Pivot Table?? Adam Excel Discussion (Misc queries) 0 March 25th 05 04:55 PM
Pivot Table Grand Totals Adam Excel Worksheet Functions 0 March 25th 05 04:55 PM
Comparing/matching totals in a column to totals in a row Nicole L. Excel Worksheet Functions 3 January 27th 05 10:42 PM
How do I show summary totals from a pivot table on a bar chart Colleen T Charts and Charting in Excel 5 January 22nd 05 01:41 AM


All times are GMT +1. The time now is 05:47 PM.

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"