+ Reply to Thread
Results 1 to 10 of 10

How to use AVERAGE on every five cells with only once keying the command

  1. #1
    Registered User
    Join Date
    02-19-2008
    Posts
    7

    How to use AVERAGE on every five cells with only once keying the command

    Hi I've a list numbers for example in cells I10, 11, 12, 13, 14
    122
    132
    163
    172
    149
    to work out the average I do function =AVERAGE(I10:I14) and I get 148 placed in K10
    How do I use this function on every five cells with only once keying in this command?
    Coloumn I goes down to I125 and I really dont have the time to key in the command at every five cells.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454
    Hi,

    Put this is K10, and copy it down as far as your data goes

    =IF((ROW())/5=ROUND((ROW())/5,0),AVERAGE(I10:I14),"")
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try in K10:

    =IF(MOD(ROW(),5)=0,AVERAGE(I10:OFFSET(I10,4,0)),"")

    copied down.

    or

    =IF(MOD(ROW(),5)=0,AVERAGE(OFFSET(I10,0,0,5,1)),"")
    Last edited by NBVC; 02-20-2008 at 09:12 AM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454
    Yup, MOD would've been neater wouldn't it?!!

  5. #5
    Registered User
    Join Date
    02-19-2008
    Posts
    7

    Thanks for the Help BUT...

    Thanks I used =IF(MOD(ROW(),5)=0,AVERAGE(I10:OFFSET(I10,4,0)),"" ) it works great in K10 and gives me the average of every 5 cells in I. BUT... sometimes I need the average of every 5 cells starting from K13 and some from K12, I've tried using this formula and the others given to me on forum to no avail. So I need some help on how to use the formula on every 5 cells but not always starting from K10 how do go about it? Thanks a lot on helping me, very kind of you.
    Last edited by avrumit; 02-22-2008 at 10:44 AM.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You can adjust the Row() function by subtracting number of rows from 10th...

    If you want to start at I12, then

    =IF(MOD(ROW()-2,5)=0,AVERAGE(I12:OFFSET(I12,4,0)),"" )

    for I13,

    =IF(MOD(ROW()-3,5)=0,AVERAGE(I12:OFFSET(I12,4,0)),"" )

  7. #7
    Registered User
    Join Date
    02-19-2008
    Posts
    7

    Thanks A Million

    Thank you very much for all your help you're Wiz No1 With Excel

  8. #8
    Registered User
    Join Date
    02-19-2008
    Posts
    7

    How do I copy the results and paste without the gaps?

    Hi thanks for your help you're really good at this. Would know how to copy the results i get from using this formula and paste them in a fresh page without the gaps?

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    So if your results in the original sheet (say, Sheet1) are in K12:K29, then try this anywhere in your other sheet.:

    Please Login or Register  to view this content.
    copied down.

    Adjust this range: Sheet1!$K$12:$K$29 to envelope full results range.

  10. #10
    Registered User
    Join Date
    02-19-2008
    Posts
    7

    Wow

    Thank You Very Much You're Number One

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1