![]() |
![]() |
|
|||||||
| 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 |
|
Board Regular
Join Date: Feb 2002
Posts: 82
|
I'm trying to take two numbers in cells B4 & B5 average them and then place this average in C4. The catch is that I also have numbers in B6 & B7 that need to get averaged and put in B6. This goes on for a few hundred rows. How do I output to C4 and how do I get it to count up two cells, average them, then move to the next two cells and do the same? Thanks for any help.
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Posts: 175
|
if all the averages are of only two cells, you should be able to put the AVERAGE function in B4, leave B5 blank, and copy these two cells over the whole column. this should put the AVERAGE function into every second row of the column.
rgds, mike |
|
|
|
|
|
#3 |
|
New Member
Join Date: May 2002
Posts: 7
|
" I also have numbers in B6 & B7 that need to get averaged and put in B6. "
Wouldn't that create a circular reference? |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Apr 2002
Posts: 112
|
Try placing this formula in cell C4 and then drag into all other cells in column C.
=AVERAGE(OFFSET(B4,ROW()-ROW($B$4),0),OFFSET(B4,ROW()-ROW($B$4)+1,0)) |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Apr 2002
Posts: 112
|
I have re-read your original post and realized I didn't quite grasp what you were trying to accomplish. Please ignore my first reply. Sorry
|
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Apr 2002
Posts: 112
|
I have re-read your original post and realized I didn't quite grasp what you were trying to accomplish. Please ignore my first reply. Sorry
|
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
Bergy,
I'd go with Mike's suggestion however, you may be able to simplify your logic using the ROW attributes rather than OFFSETTING : =IF(MOD(ROW(),2)=0,AVERAGE(B4:B5),"")
__________________
:: Pharma Z - Family drugstore :: |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|