Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ted Ted is offline
external usenet poster
 
Posts: 48
Default Average formula across future worksheets

I have an average formula =average(start:end!b37) that finds the average
across all the worksheets between the sheets named Start and End. However, I
use a macro which creates the End page when a user enters data. The formula
drops the "End" reference before the sheet is created. How can I lock the
formula so that it will always include "end"? (I am happy to get an error
message until the End page is created)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Average formula across future worksheets

--Create a dynamic named range for the sheet names in H1 to Hn. Goto
InsertNameDefine
Name: mySheets
=OFFSET(Sheet1!$H$1,,,COUNTA(Sheet1!$H:$H))


=AVERAGE(N(INDIRECT("'"& mySheets &"'!A1")))

'handling error
=IF(ISERROR(AVERAGE(N(INDIRECT("'"& mySheets
&"'!A1")))),"",AVERAGE(N(INDIRECT("'"& mySheets &"'!A1"))))

If this post helps click Yes
---------------
Jacob Skaria


"Ted" wrote:

I have an average formula =average(start:end!b37) that finds the average
across all the worksheets between the sheets named Start and End. However, I
use a macro which creates the End page when a user enters data. The formula
drops the "End" reference before the sheet is created. How can I lock the
formula so that it will always include "end"? (I am happy to get an error
message until the End page is created)

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Average formula across future worksheets

Please note that this is an array formula. You create array formulas in the
same way that you create other formulas, except you press CTRL+SHIFT+ENTER to
enter the formula. If successful in 'Formula Bar' you can notice the curly
braces at both ends like "{=<formula}"

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

--Create a dynamic named range for the sheet names in H1 to Hn. Goto
InsertNameDefine
Name: mySheets
=OFFSET(Sheet1!$H$1,,,COUNTA(Sheet1!$H:$H))


=AVERAGE(N(INDIRECT("'"& mySheets &"'!A1")))

'handling error
=IF(ISERROR(AVERAGE(N(INDIRECT("'"& mySheets
&"'!A1")))),"",AVERAGE(N(INDIRECT("'"& mySheets &"'!A1"))))

If this post helps click Yes
---------------
Jacob Skaria


"Ted" wrote:

I have an average formula =average(start:end!b37) that finds the average
across all the worksheets between the sheets named Start and End. However, I
use a macro which creates the End page when a user enters data. The formula
drops the "End" reference before the sheet is created. How can I lock the
formula so that it will always include "end"? (I am happy to get an error
message until the End page is created)

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
Average formula multiple worksheets JAbels001 Excel Discussion (Misc queries) 1 January 15th 09 01:12 AM
Still trying to average 4 worksheets and having formula problems alisah Excel Discussion (Misc queries) 2 August 15th 08 08:17 PM
Basic Future Value Formula & Interest Rate Formula Peter Excel Discussion (Misc queries) 2 November 12th 06 04:23 AM
Determine Future Value to Meet Average SteveG Excel Worksheet Functions 4 June 12th 06 09:01 PM
=Average(if( formula using different worksheets aka_krakur Excel Worksheet Functions 3 February 1st 06 12:16 AM


All times are GMT +1. The time now is 10:16 AM.

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"