Consulting

Results 1 to 7 of 7

Thread: Solved: average offset rows in a column

  1. #1
    VBAX Regular
    Joined
    Mar 2008
    Posts
    90
    Location

    Arrow Solved: average offset rows in a column

    Hello,

    I want a formula in cell D5 which should calculate average value every two cells from rabge D9 to D107.

    I've attached an example file to make this easier.

    Thanks!
    Attached Files Attached Files

  2. #2
    VBAX Tutor
    Joined
    Jun 2012
    Posts
    269
    Location
    =AVERAGE(IF(MOD(ROW(D9:107),2)=0,0,D9:107))

  3. #3
    VBAX Regular
    Joined
    Mar 2008
    Posts
    90
    Location
    superb! thanks!

  4. #4
    VBAX Regular
    Joined
    Mar 2008
    Posts
    90
    Location

    Cool

    hmm I have a little problem with this solution the average value ...is not the real one I can't say ..why...

    I'll attach the file to make this easier

    thanks!
    Attached Files Attached Files

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Try this array formula

    =AVERAGE(IF((MOD(ROW(D9:D107),2))*(D9:D107<>""),D9:D107))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  6. #6
    VBAX Regular
    Joined
    Mar 2008
    Posts
    90
    Location
    In this case I get the "#value!" error message

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Because you didn't array-enter it as I said.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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