+ Reply to Thread
Results 1 to 6 of 6

Array formula with MIN: too many arguments

  1. #1
    Registered User
    Join Date
    02-27-2013
    Location
    London
    MS-Off Ver
    Excel 20010
    Posts
    7

    Array formula with MIN: too many arguments

    Hi,

    I have this array formula:

    =MIN(IF('Review Calendar'!$B$2:$B$9999=Analysis!A31,'Review Calendar'!$D$2:$D$9999,'Review Calendar'!$G$2:$G$9999=TRUE))

    which checks the minimum date contained in sheet "Review Calendar", column D, being the Column G set to TRUE for a certain Client (contained in Cell Analysis!A31).

    So far so good. But if I try to add another parameter ('Review Calendar'!$H$2:$H$9999=$B$1)

    =MIN(IF('Review Calendar'!$B$2:$B$9999=Analysis!A31,'Review Calendar'!$D$2:$D$9999,'Review Calendar'!$G$2:$G$9999=TRUE,'Review Calendar'!$H$2:$H$9999=$B$1))

    The array formula errors out with "Too many parameters" error.

    I totally do not get what is wrong with this, do you have any idea?

    Thanks,
    M

  2. #2
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: Array formula with MIN: too many arguments

    Maybe this:
    Function if only 3 argument.
    IF( condition, [value_if_true], [value_if_false] )
    =MIN(IF('Review Calendar'!$B$2:$B$9999=Analysis!A31,'Review Calendar'!$D$2:$D$9999,'Review Calendar'!$G$2:$G$9999=TRUE,'Review Calendar'!$H$2:$H$9999=$B$1))

    There is 4 inside your if function.
    -If the problem is solved, please mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved".

    -Always upload a workbook before start your question
    To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

    +++ If my answer(s) helped you, please add me reputation by click on * +++

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: Array formula with MIN: too many arguments

    Maybe better to write it like this:

    =MIN(IF(('Review Calendar'!$B$2:$B$9999=Analysis!A31)*('Review Calendar'!$G$2:$G$9999=TRUE),'Review Calendar'!$D$2:$D$9999))

    where * is equivalent to AND in array formulae, and you don't need the FALSE element of the IF function.

    So then you can add your other term(s) like this:

    =MIN(IF(('Review Calendar'!$B$2:$B$9999=Analysis!A31)*('Review Calendar'!$G$2:$G$9999=TRUE)*('Review Calendar'!$H$2:$H$9999=$B$1),'Review Calendar'!$D$2:$D$9999))

    Note that you need to commit the formula using Ctrl-Shift-Enter.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    02-27-2013
    Location
    London
    MS-Off Ver
    Excel 20010
    Posts
    7

    Re: Array formula with MIN: too many arguments

    Great ...

    So what do you think can be a possible solution?
    I tried this to find out the MAX value

    =MAX(('Review Calendar'!$B$2:$B$9999=A31)*('Review Calendar'!$D$2:$D$9999)*('Review Calendar'!$G$2:$G$9999=TRUE)*('Review Calendar'!$H$2:$H$9999=$B$1))

    which use to work, but now is broken. Anyways it was always returning a 0 (00/01/1900)

  5. #5
    Registered User
    Join Date
    02-27-2013
    Location
    London
    MS-Off Ver
    Excel 20010
    Posts
    7

    Re: Array formula with MIN: too many arguments

    Thanks Pete,

    It worked perfectly (even with MAX function).
    How would you combine it with SMALL/LARGE to get the 2nd min/max?

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: Array formula with MIN: too many arguments

    You need to do it like this:

    =MAX(IF(conditions,max_range))

    so try it like this:

    =MAX(IF(('Review Calendar'!$B$2:$B$9999=A31)*('Review Calendar'!$G$2:$G$9999=TRUE)*('Review Calendar'!$H$2:$H$9999=$B$1),'Review Calendar'!$D$2:$D$9999))

    Hope this helps.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Large(if(and with 3 arguments on an array
    By suwbacca in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-10-2013, 01:28 PM
  2. Storing CountIfs arguments in an array?
    By fomoz in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 02-17-2011, 05:07 PM
  3. How do I set up an array using countif for 2 separate arguments.
    By Aladin Akyurek in forum Excel Formulas & Functions
    Replies: 30
    Last Post: 09-06-2005, 07:05 PM
  4. How do I set up an array using countif for 2 separate arguments.
    By crich in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  5. How do I set up an array using countif for 2 separate arguments.
    By crich in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM

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