Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamically change accumulation links when adding worksheets

I have a workbook in which a Summary worksheet accumulates data from a Detail
worksheet. Quite often I need to have extra Detail worksheets which I create
using [hold Ctrl key down, Edit, Move or Copy worksheet, Copy worksheet] as
many times as I need detail worksheets. This renames each copy and updates
all links in the Detail worksheet.

But now I have to manually update the Summary worksheet. ie.
Summary.Total = Detail 1.Subtotal + Detail 2.Subtotal + Detail 3.Subtotal
etc. etc.

Is there a way to dynamically update the cell formulae in the Summary
worksheet to link to the Subtotal cells in the Detail worksheets, as and when
I make new Detail worksheet copies.

I have tried to find a way in Excel functions and also using VBA macros, but
can not find a way to achieve it.

Anybody have any suggestions??
Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Dynamically change accumulation links when adding worksheets

U can use the worksheet_activate event of the Summary worksheet. Using VBA
code you can use the sheet number to determine the most recent Detail sheet,
or some other unique pattern. Then you can update the formula in the Summary
sheet with the correct reference. Jason
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
Dynamically adding code Martin Walke Excel Programming 2 October 21st 04 12:18 PM
Quick question about dynamically adding and naming worksheets Robbyn Excel Programming 2 August 2nd 04 01:25 AM
Adding Pivot Tables Dynamically DavidW Excel Programming 0 May 4th 04 09:16 AM
Emergency ( Adding Worksheets dynamically in Workbookds) Ussiddiqui[_3_] Excel Programming 3 January 27th 04 06:45 PM
Adding button dynamically lagodch Excel Programming 1 October 7th 03 10:14 PM


All times are GMT +1. The time now is 10:13 PM.

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"