+ Reply to Thread
Results 1 to 9 of 9

Find the row of the minimum value based on one condition

  1. #1
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    Find the row of the minimum value based on one condition

    I have an attached an example file. What I am trying to do is find the row number with the lowest value in column C where the value in column A is not equal to 1

    The formula I have used is
    Please Login or Register  to view this content.
    but it is giving row number 2 - this can be seen in cell I3 where the formula is stored. It should be returning row 77, which I have manually typed into cell I4.

    Can someone help with this formula?
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,774

    Re: Find the row of the minimum value based on one condition

    Still with Excel 2016? I think not if you are using MINIFS - please update your profile.

    The problem is you are matching only the minimum value. Try this instead:

    =MATCH(1,(C:C=MINIFS(C:C,A:A,"<>"&1))*(A:A<>1),0)
    Last edited by AliGW; 08-09-2022 at 04:07 AM. Reason: Typo corrected.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,620

    Re: Find the row of the minimum value based on one condition

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

  4. #4
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Find the row of the minimum value based on one condition

    Edit Formula in post#2 can NOT be simplified to =MATCH(1;(C:C=MIN(C:C))*(A:A<>1);0)
    Last edited by HansDouwe; 08-09-2022 at 04:42 AM.

  5. #5
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    Re: Find the row of the minimum value based on one condition

    Thanks all, both options work - and yes I still use 2016 on my personal PC

  6. #6
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Find the row of the minimum value based on one condition

    Formule in Post#3 returns zero if the minumum value in Colum C only exists if A=1. That happens when you cel C2 turns in 1.
    I made the same mistake in post #4.
    Last edited by HansDouwe; 08-09-2022 at 04:57 AM.

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,620

    Re: Find the row of the minimum value based on one condition

    I was thinking the same, on second thought

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,774

    Re: Find the row of the minimum value based on one condition

    Thanks all, both options work - and yes I still use 2016 on my personal PC
    There were three - did you try mine?

    MINIFS does not work in Excel 2016, so you should have said in your opening post which version this particular solution was for.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  9. #9
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    Re: Find the row of the minimum value based on one condition

    Quote Originally Posted by AliGW View Post
    There were three - did you try mine?

    MINIFS does not work in Excel 2016, so you should have said in your opening post which version this particular solution was for.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.
    Yes yours was the one that seemed to work best for me so thank you - thread now marked as solved

+ 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. how to find minimum of 4 variable with a condition greater than zero
    By dorabajji in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-11-2019, 08:53 AM
  2. [SOLVED] Maximum and Minimum value based on certain condition
    By MAHMUZ in forum Excel General
    Replies: 3
    Last Post: 10-31-2015, 09:51 AM
  3. [SOLVED] Minimum based on condition problem (and F9 vs cell evaluation issue)
    By ctosborne89 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-30-2012, 01:59 PM
  4. How to find a minimum value with a vlookup and a condition?
    By anthonyu in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-17-2012, 06:10 PM
  5. Find minimum value with vlookup and condition
    By anthonyu in forum Excel General
    Replies: 3
    Last Post: 04-17-2012, 09:55 AM
  6. Find the minimum value based on the month
    By madhusha92 in forum Excel General
    Replies: 3
    Last Post: 02-01-2012, 04:18 AM
  7. Maximum & Minimum Dates based on Condition
    By figs in forum Excel General
    Replies: 3
    Last Post: 08-20-2008, 09:43 PM

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