+ Reply to Thread
Results 1 to 7 of 7

Help on finding MAX and MIN with conditions

  1. #1
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2019
    Posts
    327

    Help on finding MAX and MIN with conditions

    Hello friends,

    I am working on finding performance on a sample data... I am facing a hurdle with finding the MAX and MIN with conditions. Will appreciate help on the same...

    I am attaching the file for better understanding..... The problem cells have "?" in red color in them...
    Attached Files Attached Files
    Regards,
    Navin Agrawal

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Help on finding MAX and MIN with conditions

    What numbers are you expecting to be where you have the red question marks? ie. how do you calculate these figures.

  3. #3
    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
    53,048

    Re: Help on finding MAX and MIN with conditions

    Agree that some sample answers will help us.
    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

  4. #4
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2019
    Posts
    327

    Re: Help on finding MAX and MIN with conditions

    Quote Originally Posted by kersplash View Post
    What numbers are you expecting to be where you have the red question marks? ie. how do you calculate these figures.
    I am looking at calculating the maximum PROFIT & LOSS for closed (Target achieved, Stop Loss Hit, Expired) and for ACTIVE trades...

    I am reattaching the file with comments written in the cells to make it simpler and easier to understand....
    Attached Files Attached Files

  5. #5
    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
    53,048

    Re: Help on finding MAX and MIN with conditions

    You still did not give any sample answers?
    (and why bother putting what you want, in as a comment, you could just have told us here)

    Try thios to start with for AB23
    =MAX(IF($J$2:$J$401<>"Active",$K$2:$K$401))

  6. #6
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2019
    Posts
    327

    Re: Help on finding MAX and MIN with conditions

    Quote Originally Posted by FDibbins View Post
    You still did not give any sample answers?
    (and why bother putting what you want, in as a comment, you could just have told us here)

    Try thios to start with for AB23
    =MAX(IF($J$2:$J$401<>"Active",$K$2:$K$401))
    Explaining here would not serve the purpose as it would not be clear what I am trying to say... hence, put it as comments explaining what i am trying to get and what columns need to be referred to....

    What formula do I need in the other cells?

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,987

    Re: Help on finding MAX and MIN with conditions

    Here are some possibilities for the other formulas*.
    For AB24: =MIN(IF($J$2:$J$401<>"Active",$K$2:$K$401))
    For AC23 (drag across to AD23 AFTER activating): =MAX(IF($J2:$J401<>"Active",IF($C2:$C401=AC1,$K2:$K401)))
    For AC24 (drag across to AD24 AFTER activating): =MIN(IF($J2:$J401<>"Active",IF($C2:$C401=AC1,$K2:$K401)))
    For AB31: =MAX(IF($J$2:$J$401<>"Active",$M$2:$M$401))
    For AB32: =MIN(IF($J$2:$J$401<>"Active",$M$2:$M$401))
    For AC31 (drag across to AD31 AFTER activating): =MAX(IF($J2:$J401<>"Active",IF($C2:$C401=AC1,$M2:$M401)))
    For AC32 (drag across to AD32 AFTER activating): =MIN(IF($J2:$J401<>"Active",IF($C2:$C401=AC1,$M2:$M401)))
    *All of these are array entered formulas which means that after selecting the cell and pasting the formula into the formula bar, the Ctrl, Shift and Enter keys need to be pressed simultaneously. In the case of the cells in column AC this should be done BEFORE they are copied to column AD.
    The formulas for the "Active" profit and loss cells will be similar, however change the <> symbol to =
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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] Finding the row where 2 separate conditions match
    By bebiba in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-21-2017, 11:50 AM
  2. Finding row number if two conditions are met
    By MelvinMichael245 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-10-2015, 02:40 AM
  3. Finding next value based on conditions in a formula
    By Lithium in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-20-2014, 10:02 AM
  4. Finding Top Ten Values with Multiple Conditions
    By DavidAndrew in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 02-28-2012, 07:52 PM
  5. Finding Average with few conditions
    By acsishere in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-20-2009, 06:09 PM
  6. Finding a cell with 2 conditions
    By T De Villiers in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-28-2006, 02:10 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