+ Reply to Thread
Results 1 to 5 of 5

LARGE() vs SMALL() - array problem

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-04-2004
    MS-Off Ver
    2013
    Posts
    148

    LARGE() vs SMALL() - array problem

    Hi!

    I'm having a difficulty using LARGE and SMALL.

    I want to return the 1st to 5th value of an array (each in a different row) choosing months as criteria.

    While the LARGE formula works fine, when I replace the LARGE() formula for the SMALL() leaving everything else unchanged, the formula returns ZERO and there are no ZEROS in the original data!

    Here is the function:

    =SMALL((MONTH($B$2:$B$2282)>4)*(MONTH($B$2:$B$2282)<11)*(J$33=$C$2:$C$2282)*($M$2:$M$2282);1)
    Range [M2:M2282] represents the original data where I want to extract values from.

    Thank you for your help!
    Last edited by pmguerra; 01-12-2010 at 05:27 AM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,704

    Re: LARGE() vs SMALL() - array problem

    You need to change the syntax of your formula. By using * to multiply the results you generate zeroes for all the rows where any conditions aren't satisfied (that will cause a problem for SMALL but not usually for LARGE).

    Change to using an IF syntax like this

    =SMALL(IF((MONTH($B$2:$B$2282)>4)*(MONTH($B$2:$B$2282)<11)*(J$33=$C$2:$C$2282);$M$2:$M$2282);1)

  3. #3
    Forum Contributor
    Join Date
    10-04-2004
    MS-Off Ver
    2013
    Posts
    148

    Re: LARGE() vs SMALL() - array problem

    Thank you for your help!

    I used another formula (similar to yours) and avoided the "*" and the "+".

    I have another question:

    If I want only the data from January to April and from November to December, how do I do this? How do I use the OR operator?

    Thank you!

  4. #4
    Forum Contributor
    Join Date
    10-04-2004
    MS-Off Ver
    2013
    Posts
    148

    Re: LARGE() vs SMALL() - array problem

    Nevermind! I got it!

    Thank you for your help!


  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,526

    Re: LARGE() vs SMALL() - array problem

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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