Consulting

Results 1 to 3 of 3

Thread: Find average of all values between two index match values in table

  1. #1
    VBAX Tutor
    Joined
    Jul 2015
    Posts
    212
    Location

    Find average of all values between two index match values in table

    Using index match to look up the intersection of two parameters is fine, but what if you want to average all values that occur (including the matches) of the result of two different index/match functions? In the attachment, I have a two way table. In Example 1 the result of two different parameter pairs is shown at O2 & P2. As they will always share the same RANK parameter (in same column) cell Q2 finds the average of those two values : Average of $1,201 and $1,118 = $1,159.

    However in Example 2, the variable parameters differ from 5% to 10% with same RANK of 5. I'm looking for a function to place in col Q that will find the average of all values (including and between) the Return1 and Return2 values. In this case it'll be the average of (-$8,677, -$19,927, $9,487, $-14,077, -$24,881, -$919) = -$9,832.
    Attached Files Attached Files

  2. #2
    VBAX Tutor
    Joined
    Jul 2015
    Posts
    212
    Location
    Thinking more about this, instead of AVERAGE, it would be better (and maybe easier) to SUMPRODUCT between & including the two lookup values. Another workaround might be to return a cell reference for each lookup and then SUMPRODUCT between the two references?

  3. #3
    VBAX Tutor
    Joined
    Jul 2015
    Posts
    212
    Location
    Solved it, but a Guru might be able to improve on my multi stepped solution?
    Attached Files Attached Files

Posting Permissions

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