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 / May 2008

Tip: Looking for answers? Try searching our database.

Average of every 18th cell in a column

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Piotr - 06 May 2008 17:18 GMT
Hello!

My spreadsheet looks like this:

    Column D

    value1
    value2
    value3
    ...
    Average1 of 1,2,3... (cell D25)

    value4
    value5
    value6
    ...
    Average2 of 4,5,6... (cell D43)...

Every 18th row, starting from D25 there is a "partial" average. Now, I
want to calculate the total average from them, but...

It is a template, so there actually is a value in cell D25 and D43
(25+18), but in the following cells, there only is the formula for
average calculation of future entries. In cells D61 and further, there
is an error message (dividing by 0).

What would be the formula to calculate an average from every 18th cell,
starting with D25, ending by, say, D2000, and considering only the cells
with an actual value?

Thanks in advance!
Peter
Peo Sjoblom - 06 May 2008 17:37 GMT
One way

=SUMPRODUCT(--(MOD(ROW(D25:D500),18)=7),--(D25:D500<>""),D25:D500)/SUMPRODUCT(--(MOD(ROW(D25:D500),18)=7),--(D25:D500<>""))

Signature

Regards,

Peo Sjoblom

> Hello!
>
[quoted text clipped - 28 lines]
> Thanks in advance!
> Peter
Guillermo_Lopez - 06 May 2008 17:44 GMT
> Hello!
>
[quoted text clipped - 28 lines]
> Thanks in advance!
> Peter

If you absolutely cannot restructure the spreadsheet, maybe this could
work:

= SUM(D7:D24,D26:D42,D44:D61, <etc>)/COUNT(D7:D24,D26:D42,D44:D61,
<etc>)

Count will not count Null fields. I think there is a Limit on the
number of Arguments in the SUM and COUNT functions, so to include the
112 segments you might have to split the functions: (SUM(...)+SUM(...)
+SUM(...)+<etc>)/(Count(...)+Count(...)+Count(...)+<etc>).

If you can restructure the spreadsheet, you cna add an extra column
(hide it) and use =D7 for cell (E7) and ignore the avg cells. Then
Average that on the D2000 cell. AVG (E7:E1999).

- GL
Piotr - 07 May 2008 00:21 GMT
Thanks to you two!

I used the hidden column method, very simple! You can always find a free
column, be it XFD column ;). And then I just referenced the result to
where I want it in my spreadsheet.

Greetings form Poland
Peter
 
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.