Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / March 2008

Tip: Looking for answers? Try searching our database.

Average Non-consecutive Cells

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dave.melvin@gmail.com - 27 Mar 2008 12:52 GMT
Been trying to figure this one out...

I track several parameters month/quarterly/annually in this fashion:

| Jan | Feb | Mar | Q1 | Apr | May | Jun | Q2 | Jul | Aug | Sep | Q3 |
Oct | Nov | Dec | Q4 | Annual |

In the monthly columns, I have values linked from another spreadsheet.
The Quarterly columns are the average of the preceding three months.
This part works fine with {=AVERAGE(IF(A154:C154<>0,A154:C154,0))} in
Q1 for example. I use the array to eliminate a skew by future numbers,
i.e., it only averages non-zero cells.

Here's my quandary - to get the same functionality in the "Annual"
column, currently I'm placing the values from Q1,Q2, Q3 and Q4 in
contiguous cells elsewhere in the spreadsheet and using the same type
of array formula in the "Annual" cell on that block.

Is there a way to eliminate this step? The current setup just doesn't
seem elegant to me. I can't seem to figure out a formula that I can
place in "Annual" that will average the non-zero values from Q1,Q2, Q3
and Q4 since they aren't consecutive cells.

Thanks in advance...

Dave
Bob Phillips - 27 Mar 2008 13:12 GMT
How about

=AVERAGE(D154,H154,L154,P154)

or if that doesn't work, then

=AVERAGE(IF((NOT(ISERROR(A154:P154)))*(MOD(COLUMN(A154:P154),4)=0),A154:P154))

Signature

HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Been trying to figure this one out...
>
[quoted text clipped - 22 lines]
>
> Dave
Gary''s Student - 27 Mar 2008 13:21 GMT
AVERAGE() ignores blanks, but includes zeros.  Change the quarter formulas to
something like:

=IF(old_quarter_formula=0,"",old_quarter_formula)

The yearly average will not be skewed by incomplete data.  By the way, you
can do something similar for the quarter formulas themselves.
Signature

Gary''s Student - gsnu2007g

> Been trying to figure this one out...
>
[quoted text clipped - 22 lines]
>
> Dave
GerryGerry - 27 Mar 2008 14:47 GMT
You could use the following:
=SUM(D154,H154,L154,P154)/SUM(COUNTIF(INDIRECT({"D154","H154","L154","P154"}),">0"))

> Been trying to figure this one out...
>
[quoted text clipped - 22 lines]
>
> Dave
dave.melvin@gmail.com - 27 Mar 2008 16:26 GMT
> You could use the following:
> =SUM(D154,H154,L154,P154)/SUM(COUNTIF(INDIRECT({"D154","H154","L154","P154"}),">0"))
[quoted text clipped - 29 lines]
>
> > Dave

GerryGerry,

Many thanks - this works like a charm!

Dave

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.