Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Hellion
 
Posts: n/a
Default Changing the range of several averaging functions

Hi guys

I have a spreadsheet that has a number of data. Beneath the data I have a 10
averaging functions that average data on different columns.

The data describe events.

Each event is assigned the number zero therefore I want to exclude those
values from the averaging functions (the number zero could be a result of the
event).

At the moment my average functions will state for example
AVERAGE(E6,E10)
When the event happens then I want it to become
AVERAGE(E6,E10,E13)
(Note: the averaging is not sequential i.e. 11 is not after 10, it could
jump numbers)

What I want to do is because I have 10 averaging functions that all must
include the result from the same event I want as soon as I enter E13, for the
function with for example
AVERAGE(G6,G10) to become AVERAGE (G6,G10,G13)
and for the function with
AVERAGE(Z6,Z10) to become AVERAGE (Z6,Z10,Z13)

etc...

I believe I have been clear enough but please let me know if this is not the
case.

Thanks
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Since the increment varies (randomly???), I'm not sure how you would do this
without some kind of indicator of which rows to include.

I used a helper column (D) and I could put an X in that cell if I want that row
included.

Then I could use a formula like:

=SUMPRODUCT(--(D2:D99="X"),(E2:E99))/SUMPRODUCT(--(D2:D99="X"),--(E2:E99<0))

The numerator sums up all the values in E2:E99 that have X in column D of their
corresponding row.

The denominator counts then number of non-zeros you have have.



Hellion wrote:

Hi guys

I have a spreadsheet that has a number of data. Beneath the data I have a 10
averaging functions that average data on different columns.

The data describe events.

Each event is assigned the number zero therefore I want to exclude those
values from the averaging functions (the number zero could be a result of the
event).

At the moment my average functions will state for example
AVERAGE(E6,E10)
When the event happens then I want it to become
AVERAGE(E6,E10,E13)
(Note: the averaging is not sequential i.e. 11 is not after 10, it could
jump numbers)

What I want to do is because I have 10 averaging functions that all must
include the result from the same event I want as soon as I enter E13, for the
function with for example
AVERAGE(G6,G10) to become AVERAGE (G6,G10,G13)
and for the function with
AVERAGE(Z6,Z10) to become AVERAGE (Z6,Z10,Z13)

etc...

I believe I have been clear enough but please let me know if this is not the
case.

Thanks


--

Dave Peterson
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
Changing named range reference depending on a cell's content cparaske Excel Discussion (Misc queries) 1 July 29th 05 07:06 PM
Confused about arrays and ranges in functions Llurker Excel Worksheet Functions 0 July 7th 05 05:44 AM
How to dynamically reference a dynamic named range paris3 Excel Worksheet Functions 4 June 24th 05 01:22 AM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 2 May 2nd 05 08:53 AM
changing a range of fields Mr. G. Excel Discussion (Misc queries) 3 January 31st 05 09:21 PM


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