Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default Need macro to run when workbook is calculated

Hi

I currently have a worksheet giving volumes sold per week (with a row for
each seller/product combination and each week as a column) and a second sheet
which calculates revenues via the first sheet and a lookup table, e.g.

'Revs'!C3 = 'Vol sold'!C3*vlookup($B3 [the product],prices,2,0)

As this formula is in every cell of the second sheet this is making my file
too large. I'm looking to replace it with a macro which would copy the
volumes into the revenue sheet and use Paste Special - Multiply to calculate
the revenues.

The only problem is that I need the macro to rerun whenever the workbook is
recalculated; the only events I have found on Excel help to run a macro run
it when a worksheet or chart is calculated, whereas I need this at the
workbook level. Is there an equivalent or can anyone suggest a way around
the problem?

Thanks

Keith
  #2   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default Need macro to run when workbook is calculated

see this link

http://www.cpearson.com/excel/AppEvent.htm


will trap all worksheet calc events

--
When you lose your mind, you free your life.


"Keith" wrote:

Hi

I currently have a worksheet giving volumes sold per week (with a row for
each seller/product combination and each week as a column) and a second sheet
which calculates revenues via the first sheet and a lookup table, e.g.

'Revs'!C3 = 'Vol sold'!C3*vlookup($B3 [the product],prices,2,0)

As this formula is in every cell of the second sheet this is making my file
too large. I'm looking to replace it with a macro which would copy the
volumes into the revenue sheet and use Paste Special - Multiply to calculate
the revenues.

The only problem is that I need the macro to rerun whenever the workbook is
recalculated; the only events I have found on Excel help to run a macro run
it when a worksheet or chart is calculated, whereas I need this at the
workbook level. Is there an equivalent or can anyone suggest a way around
the problem?

Thanks

Keith

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, IF function, calculated item versus calculated field NomadPurple Excel Discussion (Misc queries) 1 March 9th 10 03:17 PM
Max sheets in a workbook or max # of calculated cells phil g Excel Discussion (Misc queries) 2 October 11th 05 09:49 PM
Workbook Open macro/& Pivot Table Calculated field query Jeff Standen Excel Programming 0 May 4th 04 04:48 PM
Workbook Open macro/& Pivot Table Calculated field query Bob Phillips[_6_] Excel Programming 0 May 4th 04 04:00 PM
Workbook Open macro/& Pivot Table Calculated field query Frank Kabel Excel Programming 0 May 4th 04 03:55 PM


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