+ Reply to Thread
Results 1 to 6 of 6

Average of Unique Variables

  1. #1
    Registered User
    Join Date
    12-17-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    1

    Average of Unique Variables

    Hi

    As per simple calculation average is 16 for below numbers.

    A 10
    B 12
    C 10
    D 20
    A 30
    B 14

    ButA & B are getting repeated.
    Is it possible to calculate it as 96/4= 24

    Thanks

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,025

    Re: Average of Unique Variables

    This will work

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Average of Unique Variables

    Another way, entered as an array formula with CTRL+SHIFT+ENTER:

    Please Login or Register  to view this content.
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Average of Unique Variables

    Try one of these...

    If you only have a "few" rows of data:

    =SUM(B1:B6)/SUMPRODUCT(1/COUNTIF(A1:A6,A1:A6))

    If you have "many" rows of data, this array formula**:

    =SUM(B1:B6)/SUM(IF(FREQUENCY(MATCH(A1:A6,A1:A6,0),ROW(A1:A6)-ROW(A1)+1),1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Average of Unique Variables

    LOL!

    This post "ties in" quite nicely with what we've just been discussing in the other!
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,025

    Re: Average of Unique Variables

    I was just about to re-post, advocating the use of the much simpler SUMPRODUCT formula that Tony has just posted...

+ 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. Average with 2 variables
    By paconovellino in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-06-2013, 07:26 PM
  2. Counting Unique Variables WITH Exceptions
    By pjd2011 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 06-28-2013, 01:03 PM
  3. [SOLVED] Counting Unique combinations of two variables
    By run2win17 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-19-2012, 12:19 PM
  4. Count unique with two variables
    By maxthebear in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-23-2009, 03:42 PM
  5. search a unique value determined by 2 variables
    By Deci in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-27-2007, 09:11 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