+ Reply to Thread
Results 1 to 4 of 4

Irregular Range in excel AVERAGEIF function

Hybrid View

  1. #1
    Registered User
    Join Date
    02-04-2014
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    4

    Irregular Range in excel AVERAGEIF function

    I would like to do AVERAGEIF function to obtain "X":

    gen1 vgen1 gen2 vgen2 gen3 vgen3 2nmean
    2n 2 1n 1 2n 2,2 X

    However I canīt select irregular ranges, this i my code in "X" cell:

    =AVERAGEIF(gen1,gen2,gen3;"=*2n";vgen1,vgen2,vgen3)

    To apply in excel (Excel 2010):

    =AVERAGEIF(A2,C2,E2;"=*2n";B2,D2,F2)

    Cheers.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Irregular Range in excel AVERAGEIF function

    With your sample data in A1:G2

    This regular formula returns the average you are looking for:
    =AVERAGEIFS(B2:G2,A2:F2,"2n",B1:G1,"vgen*")
    Notice that some of the referenced ranges are offset.

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    02-04-2014
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Irregular Range in excel AVERAGEIF function

    I get my target with this code:

    unaccept


    I get my target using this simple modification in code:

    =AVERAGEIF(A2:E2;"=*2n";B2:F2)

    Thank you very much!

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Irregular Range in excel AVERAGEIF function

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. AVERAGEIF function using reference as criteria range
    By AndySan in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-05-2013, 05:35 PM
  2. [SOLVED] suppress #DIV/0 AND averageif [range]>0 Excel 2003
    By TManche in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-19-2013, 02:32 PM
  3. Excel 2007 : AVERAGEIF range function
    By Jerseynjphillypa in forum Excel General
    Replies: 1
    Last Post: 07-16-2012, 10:45 AM
  4. AVERAGEIF Function in Excel 2003
    By MatBrown217 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-06-2008, 07:18 PM
  5. Irregular AverageIf Formula
    By Moe in forum Excel General
    Replies: 2
    Last Post: 04-15-2005, 06:51 AM

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