Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Find The Lowest Corresponding Value For A Repeated Value

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Posts
    11
    Rep Power
    0

    Find The Lowest Corresponding Value For A Repeated Value

    Hi everyone

    I am new to this forum and very bad in excel. I have hit a roadblock right now. I have attached an excel file.

    My issue is this:

    I want to find the lowest value associated with a each codes (212, 223, 230, 242) corresponding to its value in the C column.

    I have tried using this formula - =IF(COUNTIF($B$2:B2,B2)>1,"",MIN(IF(($B$2:$B$17=B2 )*($C$2:$C$17<>0),$C$2:$C$17)))


    When using this formula, the value associated with Column B is changing as the cell changes, but the value of Column C doesn't change accordingly, when the equation is applied in the Column D. The result remains the same for the entire D column.

    The resultant value of 212 is 3. The values for 223, 230, 242 should be 1, 3, 5 respectively. I would be very much obliged if someone can derive one formula with which I can get the required results.

    The value of the C column should change (finding the lowest value)

    Thank you all in advance for your replies and efforts.
    Attached Files Attached Files
    Last edited by rovaniemi; 07-03-2013 at 12:31 PM.

  2. #2
    Member rollis13's Avatar
    Join Date
    Nov 2012
    Posts
    36
    Rep Power
    0
    Cross-post: Excelguru.ca

  3. #3
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    14
    Give this array-entered** formula a try...

    =IF(COUNTIF($B$2:B2,B2)>1,"",MIN(IF(($B$2:$B$17=B2 ),$A$2:$A$17)))

    **Commit this formula using CTRL+SHIFT+ENTER and not just Enter by itself.

    IMPORTANT NOTE: Turn Automatic Calculations back on... for some reason you have it set to Manual right now.

  4. #4
    Junior Member
    Join Date
    Jul 2013
    Posts
    11
    Rep Power
    0
    I don't understand. Did I make any mistake?

  5. #5
    Junior Member
    Join Date
    Jul 2013
    Posts
    11
    Rep Power
    0
    Thank you Rick. But when I entered the formula the result it gave me was 41085 rather than 1,3,5 respectively. Yes I turned on automatic calculations.

  6. #6
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    14
    Quote Originally Posted by rovaniemi View Post
    Thank you Rick. But when I entered the formula the result it gave me was 41085 rather than 1,3,5 respectively. Yes I turned on automatic calculations.
    Sorry, 41085 is the serial number for a date... I mistakenly thought you wanted the earliest date, not the minimum value in Column C. Here is the array-entered** formula modified to return values from Column C...

    =IF(COUNTIF($B$2:B2,B2)>1,"",MIN(IF(($B$2:$B$17=B2 ),$C$2:$C$17)))

    **Commit this formula using CTRL+SHIFT+ENTER and not just Enter by itself.

  7. #7
    Junior Member
    Join Date
    Jul 2013
    Posts
    11
    Rep Power
    0
    Rick thanks again. Using the above formula gives 0 as result.I don't know If I have been explaining things correctly. When I said minimum value what I meant is not zero.

    We don't need zero here. The minimum value for 212 is 3. Likewise the minimum value for 223, 230, 242 should be 1, 3, 5 respectively. That is the formula I am looking for.

    Thank you so much for the reply and patience.

    I have attached image and excel file of how the answer should be.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by rovaniemi; 07-03-2013 at 02:51 PM.

  8. #8
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi

    Tweak Rick's formula like this one.

    =IF(COUNTIF($B$2:B2,B2)>1,"",MIN(IF($B$2:$B$17=B2, IF($C$2:$C$17<>0,$C$2:$C$17))))

    Entered as an array formula
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  9. #9
    Junior Member
    Join Date
    Jul 2013
    Posts
    11
    Rep Power
    0
    A million thanks to Admin and Rick. You guys are simply brilliant. The formula worked like charm. Thank you so so so much for your help. May God bless you all.

  10. #10
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    rovaniemi, please read http://www.excelfox.com/forum/f25/me...-posters-1172/ for your response to rollis13's post above
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

Similar Threads

  1. Replies: 4
    Last Post: 04-05-2013, 12:08 PM
  2. Replies: 1
    Last Post: 03-19-2013, 03:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •