+ Reply to Thread
Results 1 to 9 of 9

Formula issue with LARGE and SMALL

  1. #1
    Registered User
    Join Date
    03-24-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    17

    Formula issue with LARGE and SMALL

    Hi all

    I have the following 3 problems on hand.

    1st problem:

    My formulas are as follows to return the 2nd highest and 3rd highest value from the following set of data. I need the result to show me the 2nd and 3rd highest value but ignoring duplicate values.
    = LARGE (A1:A13,2). Result is 370. I want the result to be 339
    = LARGE (A1:A13,3). Result is 370. I want the result to be 300

    300
    300
    339
    370
    250
    200
    138
    138
    250
    370
    370
    125
    150



    2nd problem:

    I need to do conditional formatting for the 1st lowest and 2nd lowest value for the following set of data. My formula is:
    =MIN(C1:C10). I want the result to show that all the number "1" is highlighted. This formula is currently working correctly.
    =SMALL(C1:C10,2). I want the result to show that all the number "3" is highlighted as the 2nd lowest value. This formula is not working correctly and does not conditional format if there is more than one "1" in the data.

    11
    3
    5
    4
    11
    1
    1
    3
    5
    1

    thanks all in adv for your help!

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula issue with LARGE and SMALL

    The problem with Small() or Large() or even Rank() is that they all count the same value as the same priority, and the next number is the total of all the same +1, so with 3 of the same number, they all rank as = 1 or 2 or 3, then the next number (lowest or highest) in the sequence is equal to rank 4

    Possible Solutions for the first part of your question
    For your 2 Large() funtions:
    (2nd largest):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    or
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    (3rd largest):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    or
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    EDIT-
    or
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Still working on the second part
    Last edited by dredwolf; 04-04-2013 at 01:19 AM.
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula issue with LARGE and SMALL

    See Attached, all above solutions and the SMALL solution for CF as well
    (Note - I copied your SMALL() CF values under the LARGE() values, so ranges will have to be adjusted accordingly)
    Return 2nd smallest value from a range :
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Hope this helps
    Attached Files Attached Files
    Last edited by dredwolf; 04-04-2013 at 04:10 AM. Reason: spelling correction

  4. #4
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Formula issue with LARGE and SMALL

    Hi

    Please see the file

    Is this what you looking for?
    Attached Files Attached Files
    To help you by my post? it would be nice to click on to say "Thank you".
    If you are happy with a solution to your problem?
    Click Thread Tools above your first post,
    select "Mark your thread as Solved".

  5. #5
    Registered User
    Join Date
    03-24-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Formula issue with LARGE and SMALL

    Hi dredwolf

    thanks for the solution... i tried but in some instances, the result returns the same for either the 1st and 2nd value or the 2nd and 3rd values are the same. It happens to both the Large and Small formula.

    Any help?
    Last edited by Pearlyn; 04-29-2013 at 10:22 PM.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Formula issue with LARGE and SMALL

    Add a helper column in B and use this, copied down...
    =IF(COUNTIF($A$1:A1,A1)>1,"",A1)
    then use this, copied down, to find the values you want...
    =LARGE($B$1:$B$13,ROW(A2))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Forum Contributor
    Join Date
    03-27-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    154

    Re: Formula issue with LARGE and SMALL

    Hi Pearlyn,

    Here is another alternate solution to the ones already provided. I have attached a sample workbook for you with the conditional formatting for your second problem.

    All formulas to be entered using Control+Shift+Enter:

    Second Largest Value:
    =LARGE(IF(COUNTIF(A$1:A$13,ROW(INDIRECT(MIN(A$1:A$13)&":"&MAX(A$1:A$13)))),ROW(INDIRECT(MIN(A$1:A$13)&":"&MAX(A$1:A$13)))),2)

    Third Largest Value:
    =LARGE(IF(COUNTIF(A$1:A$13,ROW(INDIRECT(MIN(A$1:A$13)&":"&MAX(A$1:A$13)))),ROW(INDIRECT(MIN(A$1:A$13)&":"&MAX(A$1:A$13)))),3)

    Smallest Value:
    =SMALL(IF(COUNTIF(C$1:C$10,ROW(INDIRECT(MIN(C$1:C$10)&":"&MAX(C$1:C$10)))),ROW(INDIRECT(MIN(C$1:C$10)&":"&MAX(C$1:C$10)))),1)

    Second Smallest Value:
    =SMALL(IF(COUNTIF(C$1:C$10,ROW(INDIRECT(MIN(C$1:C$10)&":"&MAX(C$1:C$10)))),ROW(INDIRECT(MIN(C$1:C$10)&":"&MAX(C$1:C$10)))),2)

    Let me know if this works for you.

    Thanks.
    Attached Files Attached Files

  8. #8
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula issue with LARGE and SMALL

    Well, seeing as how it's been a month since I posted the solution, with no feed back, I suggest you check out the other solutions...sorry

  9. #9
    Registered User
    Join Date
    03-24-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Formula issue with LARGE and SMALL

    Hi dredwolf

    I checked my formula and there was sth wrong. so your sol does work!

    thanks so much!

+ 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