+ Reply to Thread
Results 1 to 6 of 6

Look for data in one column and then return mean average calculated from another column

  1. #1
    Registered User
    Join Date
    04-08-2009
    Location
    England
    MS-Off Ver
    Excel 2013
    Posts
    16

    Look for data in one column and then return mean average calculated from another column

    Am trying to find a non-complicated way of getting the following. I have data more or less as follows (on a much bigger scale)

    Column A Column B Column C
    Petra Red 3.5
    John Blue 4.2
    Alice Green 3.8
    Simon Blue 2.7

    I would like Excel to be able to look in Column B for "Blue", then look at the results in Column C for those 'Blues' and return the mean average of their results (in this example, the average of 4.2 + 2.7). Is there a way I can do this, preferably without having to resort to pivot tables?

    Many thanks!

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Look for data in one column and then return mean average calculated from another colum

    Hi

    Try this array formula(C+S+E)

    =AVERAGE(IF(B1:B4="blue",C1:C4))

    Is this works, for you?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

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

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: Look for data in one column and then return mean average calculated from another colum

    One way:

    =SUMIF(B:B,"blue",C:C)/COUNTIF(B:B,"blue")

    or

    =SUMIF(B:B,$D2,C:C)/COUNTIF(B:B,$D$2) if the cell D2 has the value "blue"


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Look for data in one column and then return mean average calculated from another colum

    Hi try this
    =AVERAGEIFS(C1:C4,B1:B4,"Blue")
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  5. #5
    Registered User
    Join Date
    04-08-2009
    Location
    England
    MS-Off Ver
    Excel 2013
    Posts
    16

    Re: Look for data in one column and then return mean average calculated from another colum

    Thank you so much TMS and tom1977! Both did the trick. Never heard of AVERAGEIFS before. Very useful to know! Fotis, your response worked for 'Blue' but couldn't get it to work for the other colours but thank you for trying.
    Last edited by hpofql; 05-30-2012 at 07:12 AM.

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Look for data in one column and then return mean average calculated from another colum

    Both others solutions are betters, by meaning are not Array Formulae.

    But this is something and it's something different to say that my formula works, only for a color!

    How this can be done? Does not like the others colors??
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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