+ Reply to Thread
Results 1 to 6 of 6

AverageIF function for non-contiguous data

  1. #1
    Registered User
    Join Date
    03-25-2021
    Location
    Australia
    MS-Off Ver
    365
    Posts
    4

    AverageIF function for non-contiguous data

    Hi all
    I have data arranged in a row, grouped in pairs of columns, such that column A is the descriptor, B the value, C descriptor, D value etc.
    I want to average all values in the in row where the descriptor matches a certain criterion - actually a certain number.
    Therefore I would be averaging every second column on the same row IF the adjacent column met the criterion ie a certain number.
    I cannot get the AVERAGEIF function to work, presumably because of the non-contiguous nature?
    Does anyone know how to achieve this?

    My attempt was this: =AVERAGEIF((P7,R7,T7,V7),"=100",(Q7,S7,U7,W7))

    Thanks

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: AverageIF function for non-contiguous data

    You can use the AVERAGEIFS function:

    =AVERAGEIFS(B2:H2,$A$1:$G$1,"Descriptor",A2:G2,"=100")
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-25-2021
    Location
    Australia
    MS-Off Ver
    365
    Posts
    4

    Re: AverageIF function for non-contiguous data

    Thank you this is an excellent suggestion.
    But it relies on the column header having the same heading ie "Descriptor"
    I necessarily have to have each column header different.
    Is there a way around this?

  4. #4
    Registered User
    Join Date
    03-25-2021
    Location
    Australia
    MS-Off Ver
    365
    Posts
    4

    Re: AverageIF function for non-contiguous data

    If it helps . . . each column header for the desciptor column will start with the same text ie Prod - I was trying to find a way to incorporate the LEFT(4) function in to your formula so that perhaps it could reference the first 4 letters of each descriptor column and therefore identify the "Prod" . . .

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: AverageIF function for non-contiguous data

    Change "Descriptor" to "Prod*"

    =AVERAGEIFS(B2:H2,$A$1:$G$1,"Prod*",A2:G2,"=100")

  6. #6
    Registered User
    Join Date
    03-25-2021
    Location
    Australia
    MS-Off Ver
    365
    Posts
    4

    Re: AverageIF function for non-contiguous data

    You legend. Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. non-contiguous named range - how to use in formulas, or how to convert to contiguous list
    By david killoran in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-23-2019, 03:33 AM
  2. Pulling non-contiguous data into a contiguous set.
    By blake.thompson in forum Excel General
    Replies: 4
    Last Post: 12-10-2015, 05:49 PM
  3. [SOLVED] Using scripting dictionary to add contiguous group of items from non contiguous range
    By stnkynts in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-29-2014, 06:12 PM
  4. [SOLVED] copy and paste from contiguous cells to non-contiguous cells using the = function
    By shameus in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-05-2013, 06:48 PM
  5. [SOLVED] Expand on Parse Function/ Column to Column - Contiguous Data to include quantities
    By arcamp in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-21-2013, 05:18 PM
  6. [SOLVED] How to delete multiple contiguous (and/or) non-contiguous rows, in an excel table
    By jimmalk in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-03-2012, 05:48 AM
  7. AverageIF function
    By happycats0199 in forum Excel General
    Replies: 3
    Last Post: 05-21-2010, 03:01 PM

Tags for this Thread

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