Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Summing Generated Worksheets

I've got a stack of code to generate reports for sales advisers. One
workbook containing one worksheet per sales adviser.

I've also got code to bulk up these reports into teams, so one workbook per
team, with one worksheet per adviser (worksheet name = adviser name).

What I want to do is put in a summary (or manager) sheet on the team workbook.

As all adviser sheets are structurally the same, it's just a case of making
formulas which look at the same point on each sheet, so something like
=SUM(First Sheet:Last Sheet!H:H)

Thing is, I don't know how many sheets there will be, or what they'll be
called.

I've wondered about doing it as follows:

Define a variable to hold the first sheet name, likewise the last sheet
name, then bung in the manager sheet and set the formulas to the variable
values.

Thing is, how do I get the first and last sheet names into variables? (Esp.
the last - thet'll be the difficult one)

Any help you can give would be great.

Cheers,

Tom.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Summing Generated Worksheets

Hi


Tip: from Dave Peterson

I'd create two new worksheets--one to the far right and one to the far left. Call them Start and End
Then using a sheet (Summary) that is outside this "sandwich" of worksheets with this formula:
=Sum(Start:End!A1)

Then you can drag sheets in and out of that sandwich to play what if games.
I'd put a couple of notes on each of these sheets: "don't delete this sheet!"
And protect the worksheets so that people don't use it for real data.


See also
http://www.rondebruin.nl/linksum.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mr tom" <mr-tom at mr-tom.co.uk.(donotspam) wrote in message ...
I've got a stack of code to generate reports for sales advisers. One
workbook containing one worksheet per sales adviser.

I've also got code to bulk up these reports into teams, so one workbook per
team, with one worksheet per adviser (worksheet name = adviser name).

What I want to do is put in a summary (or manager) sheet on the team workbook.

As all adviser sheets are structurally the same, it's just a case of making
formulas which look at the same point on each sheet, so something like
=SUM(First Sheet:Last Sheet!H:H)

Thing is, I don't know how many sheets there will be, or what they'll be
called.

I've wondered about doing it as follows:

Define a variable to hold the first sheet name, likewise the last sheet
name, then bung in the manager sheet and set the formulas to the variable
values.

Thing is, how do I get the first and last sheet names into variables? (Esp.
the last - thet'll be the difficult one)

Any help you can give would be great.

Cheers,

Tom.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Summing Generated Worksheets

Thanks, Ron.

I spotted the advice, but it only offsets the problem.

I can programatically add a 'start' sheet, but how would I add an 'end' one
without knowing how many sheets were present or their names?

This all needs to be within VBA because this will be happening for hundreds
of advisers each month, so probably about 60 teams.

Cheers,

Tom.

"Ron de Bruin" wrote:

Hi


Tip: from Dave Peterson

I'd create two new worksheets--one to the far right and one to the far left. Call them Start and End
Then using a sheet (Summary) that is outside this "sandwich" of worksheets with this formula:
=Sum(Start:End!A1)

Then you can drag sheets in and out of that sandwich to play what if games.
I'd put a couple of notes on each of these sheets: "don't delete this sheet!"
And protect the worksheets so that people don't use it for real data.


See also
http://www.rondebruin.nl/linksum.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mr tom" <mr-tom at mr-tom.co.uk.(donotspam) wrote in message ...
I've got a stack of code to generate reports for sales advisers. One
workbook containing one worksheet per sales adviser.

I've also got code to bulk up these reports into teams, so one workbook per
team, with one worksheet per adviser (worksheet name = adviser name).

What I want to do is put in a summary (or manager) sheet on the team workbook.

As all adviser sheets are structurally the same, it's just a case of making
formulas which look at the same point on each sheet, so something like
=SUM(First Sheet:Last Sheet!H:H)

Thing is, I don't know how many sheets there will be, or what they'll be
called.

I've wondered about doing it as follows:

Define a variable to hold the first sheet name, likewise the last sheet
name, then bung in the manager sheet and set the formulas to the variable
values.

Thing is, how do I get the first and last sheet names into variables? (Esp.
the last - thet'll be the difficult one)

Any help you can give would be great.

Cheers,

Tom.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Summing Generated Worksheets

Why not make a summary sheet (formulas)
http://www.rondebruin.nl/summary.htm

Or (copy/paste)
http://www.rondebruin.nl/copy2.htm


When you want to have the data


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mr tom" <mr-tom at mr-tom.co.uk.(donotspam) wrote in message ...
Thanks, Ron.

I spotted the advice, but it only offsets the problem.

I can programatically add a 'start' sheet, but how would I add an 'end' one
without knowing how many sheets were present or their names?

This all needs to be within VBA because this will be happening for hundreds
of advisers each month, so probably about 60 teams.

Cheers,

Tom.

"Ron de Bruin" wrote:

Hi


Tip: from Dave Peterson

I'd create two new worksheets--one to the far right and one to the far left. Call them Start and End
Then using a sheet (Summary) that is outside this "sandwich" of worksheets with this formula:
=Sum(Start:End!A1)

Then you can drag sheets in and out of that sandwich to play what if games.
I'd put a couple of notes on each of these sheets: "don't delete this sheet!"
And protect the worksheets so that people don't use it for real data.


See also
http://www.rondebruin.nl/linksum.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mr tom" <mr-tom at mr-tom.co.uk.(donotspam) wrote in message ...
I've got a stack of code to generate reports for sales advisers. One
workbook containing one worksheet per sales adviser.

I've also got code to bulk up these reports into teams, so one workbook per
team, with one worksheet per adviser (worksheet name = adviser name).

What I want to do is put in a summary (or manager) sheet on the team workbook.

As all adviser sheets are structurally the same, it's just a case of making
formulas which look at the same point on each sheet, so something like
=SUM(First Sheet:Last Sheet!H:H)

Thing is, I don't know how many sheets there will be, or what they'll be
called.

I've wondered about doing it as follows:

Define a variable to hold the first sheet name, likewise the last sheet
name, then bung in the manager sheet and set the formulas to the variable
values.

Thing is, how do I get the first and last sheet names into variables? (Esp.
the last - thet'll be the difficult one)

Any help you can give would be great.

Cheers,

Tom.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Summing Generated Worksheets

Thanks.

Both of those look like realistic, workable solutions.

Cheers Ron.

mr tom.

"Ron de Bruin" wrote:

Why not make a summary sheet (formulas)
http://www.rondebruin.nl/summary.htm

Or (copy/paste)
http://www.rondebruin.nl/copy2.htm


When you want to have the data


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mr tom" <mr-tom at mr-tom.co.uk.(donotspam) wrote in message ...
Thanks, Ron.

I spotted the advice, but it only offsets the problem.

I can programatically add a 'start' sheet, but how would I add an 'end' one
without knowing how many sheets were present or their names?

This all needs to be within VBA because this will be happening for hundreds
of advisers each month, so probably about 60 teams.

Cheers,

Tom.

"Ron de Bruin" wrote:

Hi


Tip: from Dave Peterson

I'd create two new worksheets--one to the far right and one to the far left. Call them Start and End
Then using a sheet (Summary) that is outside this "sandwich" of worksheets with this formula:
=Sum(Start:End!A1)

Then you can drag sheets in and out of that sandwich to play what if games.
I'd put a couple of notes on each of these sheets: "don't delete this sheet!"
And protect the worksheets so that people don't use it for real data.


See also
http://www.rondebruin.nl/linksum.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mr tom" <mr-tom at mr-tom.co.uk.(donotspam) wrote in message ...
I've got a stack of code to generate reports for sales advisers. One
workbook containing one worksheet per sales adviser.

I've also got code to bulk up these reports into teams, so one workbook per
team, with one worksheet per adviser (worksheet name = adviser name).

What I want to do is put in a summary (or manager) sheet on the team workbook.

As all adviser sheets are structurally the same, it's just a case of making
formulas which look at the same point on each sheet, so something like
=SUM(First Sheet:Last Sheet!H:H)

Thing is, I don't know how many sheets there will be, or what they'll be
called.

I've wondered about doing it as follows:

Define a variable to hold the first sheet name, likewise the last sheet
name, then bung in the manager sheet and set the formulas to the variable
values.

Thing is, how do I get the first and last sheet names into variables? (Esp.
the last - thet'll be the difficult one)

Any help you can give would be great.

Cheers,

Tom.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Summing Generated Worksheets

Ron - you're a legend!

I'm going to go for the Merge cells from some or all worksheets into one
Master sheet. I'm going to use the UsedRange and use all sheets.

Just one question:
If I held this code in a control file, how would I go about making it
cycle through eg. all workbooks in a particular folder and put in the Master
sheet to each of them?

Thanks again. You've really made my week.

Tom.

"mr tom" wrote:

Thanks.

Both of those look like realistic, workable solutions.

Cheers Ron.

mr tom.

"Ron de Bruin" wrote:

Why not make a summary sheet (formulas)
http://www.rondebruin.nl/summary.htm

Or (copy/paste)
http://www.rondebruin.nl/copy2.htm


When you want to have the data


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mr tom" <mr-tom at mr-tom.co.uk.(donotspam) wrote in message ...
Thanks, Ron.

I spotted the advice, but it only offsets the problem.

I can programatically add a 'start' sheet, but how would I add an 'end' one
without knowing how many sheets were present or their names?

This all needs to be within VBA because this will be happening for hundreds
of advisers each month, so probably about 60 teams.

Cheers,

Tom.

"Ron de Bruin" wrote:

Hi


Tip: from Dave Peterson

I'd create two new worksheets--one to the far right and one to the far left. Call them Start and End
Then using a sheet (Summary) that is outside this "sandwich" of worksheets with this formula:
=Sum(Start:End!A1)

Then you can drag sheets in and out of that sandwich to play what if games.
I'd put a couple of notes on each of these sheets: "don't delete this sheet!"
And protect the worksheets so that people don't use it for real data.


See also
http://www.rondebruin.nl/linksum.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mr tom" <mr-tom at mr-tom.co.uk.(donotspam) wrote in message ...
I've got a stack of code to generate reports for sales advisers. One
workbook containing one worksheet per sales adviser.

I've also got code to bulk up these reports into teams, so one workbook per
team, with one worksheet per adviser (worksheet name = adviser name).

What I want to do is put in a summary (or manager) sheet on the team workbook.

As all adviser sheets are structurally the same, it's just a case of making
formulas which look at the same point on each sheet, so something like
=SUM(First Sheet:Last Sheet!H:H)

Thing is, I don't know how many sheets there will be, or what they'll be
called.

I've wondered about doing it as follows:

Define a variable to hold the first sheet name, likewise the last sheet
name, then bung in the manager sheet and set the formulas to the variable
values.

Thing is, how do I get the first and last sheet names into variables? (Esp.
the last - thet'll be the difficult one)

Any help you can give would be great.

Cheers,

Tom.


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
summing across worksheets Todd Hudson New Users to Excel 2 June 9th 09 07:28 AM
Summing Across Worksheets tonysoprano Excel Discussion (Misc queries) 5 January 20th 09 02:28 AM
Qualifying a generated value as unique across worksheets jloos Excel Discussion (Misc queries) 3 August 1st 06 09:54 PM
Summing across several worksheets Al Excel Discussion (Misc queries) 5 March 16th 06 01:02 PM
Summing figures generated by formulas lobo Excel Programming 1 March 6th 06 08:25 PM


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