View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Automatic Formula Update

Andy,

You could use the workbook open event to automatically copy the value to a storage cell. If on
Sheet1 your cell B2 has the formula

=AVERAGE(A:A)

and you copy and paste its value to cell C2 just before every time you update the values in column
A, then you could use

Private Sub Workbook_Open()
Application.EnableEvents = False
Worksheets("Sheet1").Range("C2").Value = Worksheets("Sheet1").Range("B2").Value
Application.EnableEvents = True
End Sub

Copy the code and place it into the Thisworkbook's codemodule.

See here for more instructions on using event code:

http://www.cpearson.com/excel/Events.aspx


HTH,
Bernie
MS Excel MVP


"Andy_jm" wrote in message
...
I have an Excel 2003 spreadsheet with a column of figures to which I add 2
figures daily. I have a second column showing the daily average. The
difference between the last average and the first appears in a seperate cell.
However I have to update this cell manually. I'm wondering if anyone knows
how to automate this calculation so that it updates whenever I add a new
figure to the original column?