![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 3
|
Start with a list of 100 numbers in column A. Display the average of the first five numbers in B5, the average of the next 5 numbers in B10, etc.
John Adams |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: London, UK
Posts: 167
|
is this a question?
if so, then a simple formula in B5 as follows... =AVERAGE(A1:A5) ...will give you the value you want, and then you can copy and paste this cell every 5 cells. If you want a formula that you can fill down the whole list to give the relevant average every 5 cells, use the following in cell B5 and fill down from there... =IF(ROUND((CELL("row",A5)/5),0)=(CELL("row",A5)/5),AVERAGE(A1:A5),"")
__________________
<table style="background-color:#0e54be" cellspacing="1" cellpadding="2"><td style="background-color:#ceffff;font-family:arial;color:#072c63;font-size:8pt;">***DALEY** :P**</td></table> |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Or, simply enter...
=IF(MOD(ROW(),5),"",AVERAGE(OFFSET(A1,-4,,5))) ...into B1 and copy down. [ This Message was edited by: Mark W. on 2002-04-19 13:36 ] |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
Why not use your earlier simpler formula =AVERAGE(A1:A5) highlite cells A1:A5 and then drag down ... just curious about the merits of using the other long formula you suggested. Regards! Yogi Anand |
|
|
|
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
Of course, I also prefer my own formulation... =IF(MOD(ROW(),5),"",AVERAGE(OFFSET(A1,-4,,5))) ...but no surprise there! [ This Message was edited by: Mark W. on 2002-04-19 13:52 ] |
|
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
Regards! Yogi Anand |
|
|
|
|
|
|
#7 | |
|
Board Regular
Join Date: Mar 2002
Location: London, UK
Posts: 167
|
yep, i bow at your feet! Got the ball rollin' though huh?
Yogi, was just doin it logically with my existing skills, not with Marks expertise (his MOD solution is very nice). _________________
[ This Message was edited by: daleyman on 2002-04-19 15:38 ] |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|