+ Reply to Thread
Results 1 to 4 of 4

maxif, minif functions

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-23-2008
    Location
    UK
    Posts
    137

    maxif, minif functions

    Hi, I am trying to get these functions working but having problems.

    From a different thread we have:

    If you have the unique items listed somewhere on the same sheet or in another sheet, then you can use Min(if()), Max(if()) and Mode(If()) array formulas...

    e.g.

    if you database is in Sheet1, A1:B100 where A1:A100 lists the items, B1:B100 lists the prices then:

    =MIN(IF($A$1:$A$100=X1,$B$1:$B$100)) will give the miimum from column B of the item in column A that matches the entry in X1

    after entering the formula, confirm it with CTRL+SHIFT+ENTER not just ENTER and copy down.

    replace Min for Max and Mode to get those relevant results.


    but I have a list of indentifiers is column A and a unique identifier in X1 and a numerical data item in column B. This returns a NUM!! error. I am using CTRL+SHIFT+ENTER.

    Thanks

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: maxif, minif functions

    In your version of the above formula are you using entire column references by any chance ? (ie $A:$A as opposed to $A$1:$A$100)

    If you are and you're using a version pre XL2007 you will receive the error you describe.
    Arrays are inefficient - keep ranges as lean as possible at all times.

  3. #3
    Forum Contributor
    Join Date
    09-23-2008
    Location
    UK
    Posts
    137

    Re: maxif, minif functions

    You are the smartest donkey I know.

    I was using the entire column, thanks

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: maxif, minif functions

    Sound like you need to get out there and meet more donkeys

    Glad you have resolved

    With Arrays if the precedent ranges change regularly and are potentially large then it's often wise to use Dynamic Named Ranges (created with INDEX rather than OFFSET if possible).
    Performance wise this would be better than building in lots of "spare capacity" via enlarged hard wired ranges from the get-go.

+ 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