+ Reply to Thread
Results 1 to 5 of 5

How to calculate average of one column, based on the values on another column

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    Bayreuth, Germany
    MS-Off Ver
    Excel 2010
    Posts
    10

    How to calculate average of one column, based on the values on another column

    Hey :-)

    This is Sadra. I'm working on my master thesis on Remote Sensing and urban Heat Islands. I need a help with calculating average values in excel, and I appreciate any help of you.
    So I have two columns of data, named "Grid" and "Temperature" (snapshot included below):

    Capture.JPG

    I would like to calculate the average of column B (Temperature), BUT based on the length of the values in Column A (Grid). In other words, I want the average of B2:B9, B10:B12, B13:B15 and so on.


    Many thanks in advance for your help,
    Best Regards,
    SAdra

  2. #2
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: How to calculate average of one column, based on the values on another column

    why cant you use the =AVERAGE(B2:B9) etc. function?

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: How to calculate average of one column, based on the values on another column

    Try AVERAGEIF function

    List all your grid numbers in D2 down, e.g. 0, 1, 2, 3 etc. then in E2 use

    =AVERAGEIF(A:A,D2,B:B)

    copy formula down
    Audere est facere

  4. #4
    Registered User
    Join Date
    12-12-2012
    Location
    Bayreuth, Germany
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: How to calculate average of one column, based on the values on another column

    Quote Originally Posted by Legend Rubber View Post
    why cant you use the =AVERAGE(B2:B9) etc. function?
    I can, but it will take me a month to calculate it as I have 24000 rows to calculate :-D
    And beside that as you can see in the snapshot, each time the amount of fields on B varies based on the values on A. Sometime the average is for 3 rows, some times for 7, and that's annoying!
    I hope you understood what I'm looking for

    Cheers,
    Sadra

  5. #5
    Registered User
    Join Date
    12-12-2012
    Location
    Bayreuth, Germany
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: How to calculate average of one column, based on the values on another column

    Quote Originally Posted by daddylonglegs View Post
    Try AVERAGEIF function

    List all your grid numbers in D2 down, e.g. 0, 1, 2, 3 etc. then in E2 use

    =AVERAGEIF(A:A,D2,B:B)

    copy formula down

    Thank You Very Much Dude!! I appreciate your help

    Cheers,
    Sadra

+ 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