+ Reply to Thread
Results 1 to 5 of 5

"MAXIF" Function, or equivalent?

  1. #1
    Registered User
    Join Date
    08-06-2007
    Posts
    35

    "MAXIF" Function, or equivalent?

    Hi all!

    I have a spreadsheet that I'm working on that compiles survey data from an online survey. I have averages, high scores, low scores, etc. figuring off of my data to product charts and graphs for a client.

    I am attempting to find the high and low scores for individual surveys (there are 1054 surveys total right now). I know of max and min, but I really need something that would function like a "maxif" (which I realize does not exist).

    Here's the problem:

    In column A, I have a list of insurance provider names per survey (so, 1054 entries total). I then have some columns in between that show scores on questions from the survey, and then column AB contains my averages for each individual survey. Column AD has a list of the insurance provider names in alphabetical order (there are 167 unique provider names used in the 1054 surveys). Column AF is my high score column and lines up with column AD (so, I am looking to have 167 high scores in total as I want the high score per each provider, not survey).

    Let's pretend A2:A10 say "Anthem Insurance."
    I want to create a formula that would basically say something like:

    Count what rows in column A = "Anthem Insurance," then match those cells to AB (so, it would figure since A2:A10 are the targeted cells, then I also want to correspond to AB2:AB10) and give me the high score (MAX) for that range of cells.

    Is there a way to do this? Otherwise, I have to manually go through all 1054 rows and see what range of cells equal a certain insurance provider name to get those 167 high scores. I can keep doing this if I have to, but this data changes every single week and it eats up a lot of time.

    Thanks!

    Edit: Actually, one more question. If this would make the whole mess easier, is there a way to tell Excel to report a range to me? If I were to create a column, could I tell Excel, "Look at A2:A1055 and tell me what range of cells equals 'Anthem Insurance'" and have it report "A2:A10" as the value? If I could do that, at least the ranges would be right in front of me.
    Last edited by Oriana; 12-01-2008 at 08:19 AM. Reason: Had one more question to add

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    re: MAXIF" Function, or equivalent?

    Here's an example for a MAXIF function. I've used the LARGE() as an array function.
    Please Login or Register  to view this content.
    A2:A7 has all the providers, B2:B7 their values and C2 the MAX for provider A2.
    See my attachement. If you would like this for you WS then please attach it )or part)
    Attached Files Attached Files
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284
    Try this array formula

    =MAX(IF($A$1:$A$7=myVal,$B$1:$B$7))

  4. #4
    Registered User
    Join Date
    08-06-2007
    Posts
    35
    Quote Originally Posted by rwgrietveld View Post
    Here's an example for a MAXIF function. I've used the LARGE() as an array function.
    Please Login or Register  to view this content.
    A2:A7 has all the providers, B2:B7 their values and C2 the MAX for provider A2.
    See my attachement. If you would like this for you WS then please attach it )or part)
    This worked perfectly!! Thank you!

    Can you explain to me a little more how it works? I want to make sure I understand so I can explain it later if the client asks me. I used the following:

    Please Login or Register  to view this content.
    ...and then I just copied that formula down the alphabetic list of provider names that I have (Column A is a list of the providers by survey, Column AD is my alphabetic list of providers, and Column AB is my list of averages for each survey).

    I don't understand how the 1 on the end figures in, though. This is my first time using arrays.

    Thank you again!

  5. #5
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284
    Quote Originally Posted by Oriana View Post
    This worked perfectly!! Thank you!

    Can you explain to me a little more how it works? I want to make sure I understand so I can explain it later if the client asks me. I used the following:

    Please Login or Register  to view this content.
    ...and then I just copied that formula down the alphabetic list of provider names that I have (Column A is a list of the providers by survey, Column AD is my alphabetic list of providers, and Column AB is my list of averages for each survey).

    I don't understand how the 1 on the end figures in, though. This is my first time using arrays.

    Thank you again!
    LARGE(..., 1)

    gets the largest value, which is exactly what MAX does. It is explained in help.

+ 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