+ Reply to Thread
Results 1 to 6 of 6

Finding Avg. Based on Criteria Found in a Second Column

  1. #1
    Registered User
    Join Date
    02-06-2008
    Posts
    13

    Finding Avg. Based on Criteria Found in a Second Column

    Hello, I have to find the Average for values in Column 1 matching the criteria (Type) in Column 2 IE

    Column 1----Column2

    AAA----7
    AAB----6
    AAA----3
    AAC----9
    AAB----14
    AAA----5
    AAE----7

    I need a formula which would check Column 1 find all of the matching values (AAA, AAB, etc.) then calculate an average using the values in Column 2 associated with the values found. Example: The above Average for AAA would be 5.
    It's seems rather straight forward but so far I've had no luck with anything I've tried, I'm rather new so I'm hoping it's just something simple.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Placing each of your criteria in column A, in column B (in my example, B11 with the data in A2 to A8)
    Please Login or Register  to view this content.
    I attached an example file.

    ChemistB
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-06-2008
    Posts
    13
    First off, thank you very much for the reply.

    I took a look at the attached file & noted that although the formula calculated correctly for AAA (3 found with a total value of 15 equaling an average of 5, the same wasn't true for AAB (2 found with a total of value of 20 and an average of 10), nor AAC, calculated average 9, or AAE which is 7.

    I'm certain the problem was my explaination of what I was looking for.

    Basically, the function needs to search a column, count the number of times a variable appears (Vx), check the value in the next column associated with each of those found, Total the values (Vt), then divide the Vt by Vx, to arrive at an average for just those variables.

    Again I apolgize if my earlier post was unclear, or infact I'm missing something with the formula you sent (which is quite possible) I appreciate you taking the time to assist me.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Not your fault, my fault.

    The Sum range for column B needs to be locked in place (with $). The correct formula in B11 (which and be dragged down) would be
    Please Login or Register  to view this content.
    Sorry about that.

    ChemistB

  5. #5
    Registered User
    Join Date
    02-06-2008
    Posts
    13

    Thumbs up

    Thank you so much ChemistB, the formula works like a charm. It's exactly what I was looking for, really appreciate it.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Glad it helped.

    ChemistB

+ 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