+ Reply to Thread
Results 1 to 10 of 10

=MIN Formula with condition

  1. #1
    Registered User
    Join Date
    05-29-2014
    Location
    New York, NY
    MS-Off Ver
    2010
    Posts
    10

    =MIN Formula with condition

    Hi, I am struggling with the condition that I want to put in the MIN formula in excel sheet where I want the formula to find minimum value within the same year on the next column.
    Any help would be appreciated.
    Here is the image of what I have now and desired results.
    column A has years ranging from 2011 to 2014 and on column B, associated values for that row.
    I am looking to write formula in column C to spit out the lowest value from column B for that year associated in column A.
    I hope this makes sense.

    QUESTION TO EXCEL FORUM.JPG
    Last edited by fullspeed; 02-06-2015 at 03:43 PM.

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

    Re: =MIN Formula with condition

    You can use an "array formula" like this in C2 for Desired results 2

    =MIN(IF(A$2:A$10=A2,B$2:B$210))

    confirm with CTRL+SHIFT+ENTER and copy down

    ....or a non-array option

    =AGGREGATE(15,6,B$2:B$10/(A$2:A$10=A2),1)

    If you only want to show the min value on the row(s) where it occurs (Desired results 1) try this version

    =IF(COUNTIFS(A$2:A$10,A2,B$2:B$10,"<"&B2),"",B2)
    Last edited by daddylonglegs; 02-06-2015 at 03:26 PM.
    Audere est facere

  3. #3
    Registered User
    Join Date
    05-29-2014
    Location
    New York, NY
    MS-Off Ver
    2010
    Posts
    10

    Re: =MIN Formula with condition

    Thank you Daddylonglegs.
    It is though giving me 6 for all of the rows in column C.
    I think i did the array formula correctly?
    here is the screen shot

    QUESTION FOR EXCEL FORUM 2.JPG

  4. #4
    Registered User
    Join Date
    05-29-2014
    Location
    New York, NY
    MS-Off Ver
    2010
    Posts
    10

    Re: =MIN Formula with condition

    It looks like when I do the array, it won't let me change the cell reference in the formula - so for example, I want to change the cell reference to =MIN(IF(A$3:A$11=A4,B$3:B$11)) in cell C4, but it is not letting me.

  5. #5
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: =MIN Formula with condition

    Hi I don't mean to take over for daddylonglegs, but this is a different kind of array formula. Only select and enter the formula into the first cell, hit Control + Shift + Enter and then you can copy paste to the other cells or just drag it down to copy it.

    Quote Originally Posted by fullspeed View Post
    It looks like when I do the array, it won't let me change the cell reference in the formula - so for example, I want to change the cell reference to =MIN(IF(A$3:A$11=A4,B$3:B$11)) in cell C4, but it is not letting me.

  6. #6
    Registered User
    Join Date
    05-29-2014
    Location
    New York, NY
    MS-Off Ver
    2010
    Posts
    10

    Re: =MIN Formula with condition

    Actually, =IF(COUNTIFS(A$2:A$10,A2,B$2:B$10,"<"&B2),"",B2) worked out perfectly. so I am just going to use this one. Thank you so much!!

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: =MIN Formula with condition

    When you do the array, only do it in C3. Then copy/drag it down to the other cells. If you have all the cells selected when you create the array, it creates a different sort of array.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  8. #8
    Registered User
    Join Date
    05-29-2014
    Location
    New York, NY
    MS-Off Ver
    2010
    Posts
    10

    Re: =MIN Formula with condition

    ah I see!
    entered the formula,
    hit F2,
    hit Control + Shift + Enter and
    dragged it down

    This worked! Thank you so much Skywriter.

  9. #9
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,271

    Re: =MIN Formula with condition

    Hi fullspeed,

    I like Pivot Tables and they will give minimums per FY. So I've created a Pivot Table and shown minimums and then used it in a VLookup. See the attached. This is just another option for doing your problem.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  10. #10
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: =MIN Formula with condition

    Quote Originally Posted by fullspeed View Post
    ah I see!
    entered the formula,
    hit F2,
    hit Control + Shift + Enter and
    dragged it down

    This worked! Thank you so much Skywriter.
    Thanks for the if countsifs formula, I've never seen that one before, I like it.

+ 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. [SOLVED] How to add if condition to the formula?
    By mso3 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-11-2014, 11:28 AM
  2. [SOLVED] Condition formula help
    By MATU70 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 03-23-2014, 04:04 PM
  3. Excel formula if conition formula for 2 condition with consider timings
    By breadwinner in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-18-2013, 11:05 AM
  4. [SOLVED] Help for if condition formula result only either hit or miss from mulitple condition
    By breadwinner in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-09-2013, 07:29 AM
  5. Two-condition If formula
    By darksupernova in forum Excel General
    Replies: 9
    Last Post: 08-08-2008, 01:47 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