+ Reply to Thread
Results 1 to 5 of 5

AVERAGEIF / SUMIF with multiple ranges

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    Guildford, UK
    MS-Off Ver
    Excel 2003
    Posts
    23

    AVERAGEIF / SUMIF with multiple ranges

    Hi there. I realise this topic has been brought up before but the solution and question was slightly different from the problem im having.

    I need a formula to average out various 'non-error' cells dotted around my worksheet.

    My data is appearing in cells G8 G57 G106 G155 G204 & G253
    The cells either have values of between 1and10, or -more commonly- have #N/A values. (purposefully used to avoid graph interpolation issues)

    Is there any way I can do use an AVERAGEIF formula or some equivalent thereof to get the average of just the values that appear between 1 and 10 (i.e. ignore N/A values)?
    Something like:
    =AVERAGEIF((G8,G57,G106,G155,G204,G253), "<> NA()", (G8,G57,G106,G155,G204,G253))

    I tried to get around the problem using a normal average, but the problem is persisting:
    Please Login or Register  to view this content.
    Any help is appreciated.
    Last edited by xandermacleod; 09-13-2012 at 01:27 PM.

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

    Re: AVERAGEIF / SUMIF with multiple ranges

    Try:

    =AVERAGE(IF(ISNUMBER(G8:G253),IF((MOD(ROW(G8:G253)-ROW(G8),49)=0)*(G8:G253),G8:G253)))

    confirmed with CTRL+SHIFT+ENTER not just ENTER
    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.

  3. #3
    Registered User
    Join Date
    09-10-2012
    Location
    Guildford, UK
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: AVERAGEIF / SUMIF with multiple ranges

    Part of the problem is that I need to use a formula that can then do a separate average for - G9 G58 G107 G156 G205 & G254
    Similarly again I will need a separate one for - G10 G59 G108 G157 G206 & G255
    and again for - G11 G60 G109 G158 G206 & G256
    etc
    all the way up to - G54 G103 G152 G201 G250 & G299


    Hence I cant use a G8:G253 style range.

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

    Re: AVERAGEIF / SUMIF with multiple ranges

    This part n the formula:

    MOD(ROW(G8:G253)-ROW(G8),49)=0

    grabs and checks only every 49th cell starting from G89.. so if you copy down, then it will do the same but start at G9.

    Try it and test it...

  5. #5
    Registered User
    Join Date
    09-10-2012
    Location
    Guildford, UK
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: AVERAGEIF / SUMIF with multiple ranges

    oops. perfect! worked a charm!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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