Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Automatic Formula Update

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?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Automatic Formula Update

Note: find contents of last used cell (row)
=LOOKUP(2,1/(LEN(1:1)0),1:1)

Note: find contents of last used cell (column)
=LOOKUP(1E+100,H:H)

Average of last three numbers in a row:
=AVERAGE(OFFSET(A1,0,COUNT(1:1)-3,1,3))

Average of last three numbers in a column:
=AVERAGE(OFFSET(INDIRECT("A" & COUNTA(A:A)),-2,0,3))

HTH,
Ryan--

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Andy_jm" wrote:

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?

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
Automatic update of spreadsheet & automatic update between workboo Losva Excel Worksheet Functions 6 September 12th 08 03:22 PM
Insert Row - Stop Automatic Formula Update Kevin Excel Worksheet Functions 1 July 8th 08 10:09 AM
Automatic update formula when worksheet 1 move to another excel fi Bob Ng Kai Sin Excel Discussion (Misc queries) 3 August 28th 07 02:19 AM
Automatic Update Chuck Charts and Charting in Excel 1 June 9th 06 07:34 PM
Automatic update LLoraine Excel Discussion (Misc queries) 3 February 24th 06 08:57 PM


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