Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Karen K
 
Posts: n/a
Default Average every 20 rows

I have a data of 14000 rows. I need Average on every 20 cells. Instead of
copying and pasting the formula into every 20 cells to get the result which
will take forever is there a function to obtain the results automatically?

I'm trying group every 20 rows automatically unfortunately it didn't help
either. Help!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB
 
Posts: n/a
Default Average every 20 rows

One way you could do it. Insert a column to the left of your data (lets say
this new column is Column A). Enter "A" in the first 20 cells of this
column. Enter "B" in the next 20 cells. Now select these cells with "A" and
"B" and copy. Now select the rest of column A and paste (note that your
paste range must be divisible by 40 - subtract any headers you may have).
Now, you should have alternating groups of 20 A's and B's in column A.

Then select your table (including column A), click Data/Subtotal. At each
change in Column A, use Average on whatever column contains the data you want
averaged. Does this help?

"Karen K" wrote:

I have a data of 14000 rows. I need Average on every 20 cells. Instead of
copying and pasting the formula into every 20 cells to get the result which
will take forever is there a function to obtain the results automatically?

I'm trying group every 20 rows automatically unfortunately it didn't help
either. Help!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Average every 20 rows

Another play to try ..

Assuming data is in A1:A14000

Put in B1:
=AVERAGE(OFFSET(INDIRECT("A"&ROW(A1)*20-19),,,20))
Copy B1 down to B700 (14000 / 20 = 700)

B1 returns the same as: =AVERAGE(A1:A20)
B2 returns the same as: =AVERAGE(A21:A40)
and so on ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Karen K" <Karen wrote in message
...
I have a data of 14000 rows. I need Average on every 20 cells. Instead

of
copying and pasting the formula into every 20 cells to get the result

which
will take forever is there a function to obtain the results automatically?

I'm trying group every 20 rows automatically unfortunately it didn't help
either. Help!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Average every 20 rows

A non-volatile alternative:

=AVERAGE(INDEX(A$1:A$100,(ROWS($1:1)-1)*20+1):INDEX(A$1:A$100,ROWS($1:1)*20))

Biff

"Max" wrote in message
...
Another play to try ..

Assuming data is in A1:A14000

Put in B1:
=AVERAGE(OFFSET(INDIRECT("A"&ROW(A1)*20-19),,,20))
Copy B1 down to B700 (14000 / 20 = 700)

B1 returns the same as: =AVERAGE(A1:A20)
B2 returns the same as: =AVERAGE(A21:A40)
and so on ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Karen K" <Karen wrote in message
...
I have a data of 14000 rows. I need Average on every 20 cells. Instead

of
copying and pasting the formula into every 20 cells to get the result

which
will take forever is there a function to obtain the results
automatically?

I'm trying group every 20 rows automatically unfortunately it didn't help
either. Help!





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Average every 20 rows


Assuming your data starts at A1 then this formula in B1 filled down
column

=IF(MOD(ROW()-ROW(A$1)+1,20)=1,AVERAGE(A1:A20),"")

will give you an average in B1 of A1:A20, an average in B21 of A21:A40
and so on, alter formula to suit if data starts elsewhere.


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=508032

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
How to swap rows and columns? [email protected] Excel Discussion (Misc queries) 5 September 21st 05 08:07 AM
How do I sort (or group?) a spreadsheet by similar rows? steve Excel Worksheet Functions 3 August 27th 05 06:33 PM
AVERAGE and STDEV functions with logic t-rung Excel Worksheet Functions 1 May 26th 05 07:11 PM
Hiding Rows if the linked rows are blank KG Excel Discussion (Misc queries) 9 May 18th 05 02:32 AM
flexible paste rows function that inserts the right number of rows marika1981 Excel Discussion (Misc queries) 1 February 18th 05 02:40 AM


All times are GMT +1. The time now is 06:09 AM.

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"