+ Reply to Thread
Results 1 to 16 of 16

index, max, small, if

  1. #1
    Registered User
    Join Date
    07-31-2016
    Location
    tirana
    MS-Off Ver
    2016
    Posts
    16

    index, max, small, if

    Hello,

    I want a formula that calculates the max values in a2:c2 , bigger than 2 , that have corresponding value of =0 in e2:g2





    excel picture.jpg

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

    Re: index, max, small, if

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: index, max, small, if

    Try this array formula:

    =IFERROR(INDEX($A$1:$C$1,MATCH(MAX(IF(E2:G2=0,IF(A2:C2>2,A2:C2))),IF(E2:G2=0,A2:C2),0)),"")

    You may need to change , to ; depending on your regional settings.


    Array Formulae are a little different from ordinary formulas in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly braces { } appear around the outside of your formula. If you do not CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly braces yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: index, max, small, if

    I've just seen AliGW's post. She's right. Cross-posting is a nuisance. I may have wasted my time giving you an answer that you already have. Please include links in future.
    Last edited by Glenn Kennedy; 07-31-2016 at 06:52 AM.

  5. #5
    Registered User
    Join Date
    07-31-2016
    Location
    tirana
    MS-Off Ver
    2016
    Posts
    16

    Re: index, max, small, if

    first sorry for not posting the link to other forum thread
    http://www.ozgrid.com/forum/showthread.php?t=200626

    second thank you Glenn very much for the solution , especially since its a sunday

    third if you can help me with modifying the formula for asking the minimun value this time and changing one of the criteria

    my modification doesnt seem to work

    =IFERROR(INDEX($A$1:$C$1,MATCH(MIN(IF(E2:G2>0,IF(A2:C2>2,A2:C2))),IF(E2:G2>0,A2:C2),0)),"")
    Last edited by donnIeDorian; 07-31-2016 at 09:39 AM.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: index, max, small, if

    What are the criteria now?
    The minimum value of A to C, where E to G must be positive AND A to C must be greater than 2... or something else?

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: index, max, small, if

    I see that you're in Tirana - a nice spot. I've been there twice, the last time in Dec 2014. I spent an enjoyable week working there, staying in Rruga Brigada VIII in the Blloku area. Lots of nice restaurants and pubs !!

  8. #8
    Registered User
    Join Date
    07-31-2016
    Location
    tirana
    MS-Off Ver
    2016
    Posts
    16

    Re: index, max, small, if

    Quote Originally Posted by Glenn Kennedy View Post
    What are the criteria now?
    The minimum value of A to C, where E to G must be positive AND A to C must be greater than 2... or something else?
    Yes , that's exactily what I need, for now

  9. #9
    Registered User
    Join Date
    07-31-2016
    Location
    tirana
    MS-Off Ver
    2016
    Posts
    16

    Re: index, max, small, if

    Quote Originally Posted by Glenn Kennedy View Post
    I see that you're in Tirana - a nice spot. I've been there twice, the last time in Dec 2014. I spent an enjoyable week working there, staying in Rruga Brigada VIII in the Blloku area. Lots of nice restaurants and pubs !!
    Happy you liked my hometown

    Wished Mcgraegor came too
    Last edited by donnIeDorian; 07-31-2016 at 10:17 AM.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: index, max, small, if

    In what way doesn't it work? It seems to be fine to me!! Are you sure that you array entered it? Are the curly brackets there?
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    07-31-2016
    Location
    tirana
    MS-Off Ver
    2016
    Posts
    16

    Re: index, max, small, if

    I must have done sth wrong, seems perfectly working in your workbook

    You added min and max values which is what I planned to do. Perfect


    though when A:C range is all 0 I need it to show blank pertaining to this criteria not being met ,IF(A2:C2>2

    If it is possible that if max value is blank also min value shows blank

    ..
    Last edited by donnIeDorian; 07-31-2016 at 05:11 PM.

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: index, max, small, if

    A slight addition (array entered) sorts that:

    =IF(AND(A2=0,B2=0,C2=0),"",IFERROR(INDEX($A$1:$C$1,MATCH(MAX(IF(E2:G2=0,IF(A2:C2>2,A2:C2))),IF(E2:G2=0,A2:C2),0)),""))

    and

    =IF(AND(B2=0,C2=0,D2=0),"",IFERROR(INDEX($A$1:$C$1,MATCH(MIN(IF(E2:G2>0,IF(A2:C2>2,A2:C2))),IF(E2:G2>0,A2:C2),0)),""))

    But. Take a look at row 2. There are two possible answers. Can this happen in your real data? how do you want it handled?
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    07-31-2016
    Location
    tirana
    MS-Off Ver
    2016
    Posts
    16

    Re: index, max, small, if

    Quote Originally Posted by Glenn Kennedy View Post
    A slight addition (array entered) sorts that:

    =IF(AND(A2=0,B2=0,C2=0),"",IFERROR(INDEX($A$1:$C$1,MATCH(MAX(IF(E2:G2=0,IF(A2:C2>2,A2:C2))),IF(E2:G2=0,A2:C2),0)),""))

    and

    =IF(AND(B2=0,C2=0,D2=0),"",IFERROR(INDEX($A$1:$C$1,MATCH(MIN(IF(E2:G2>0,IF(A2:C2>2,A2:C2))),IF(E2:G2>0,A2:C2),0)),""))

    But. Take a look at row 2. There are two possible answers. Can this happen in your real data? how do you want it handled?


    If I change E2 to 0 , max value shows up AAA, even if a2 is 0. Max should show value of header only if A:C value of that header is +2 (or later to be changed).
    and if max shows blank, min to show blank

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: index, max, small, if

    Mmmm. i think this is it.
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    07-31-2016
    Location
    tirana
    MS-Off Ver
    2016
    Posts
    16

    Re: index, max, small, if

    Yes that worked like magic.

    Thank you

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: index, max, small, if

    Woo Hoo!!!

+ 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. index with small
    By mena in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-11-2016, 09:02 AM
  2. [SOLVED] ask formula index+small + if
    By daboho in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-12-2015, 04:29 AM
  3. [SOLVED] Index() Small() Row()
    By Shakeel Ahmad in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-05-2015, 12:36 AM
  4. Match Index, Small Index with Concatenate
    By kharding15 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-30-2015, 05:38 PM
  5. INDEX SMALL and ROW
    By MAG27 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-11-2015, 09:59 PM
  6. INDEX and SMALL help
    By markgilmore in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-02-2015, 01:02 PM
  7. Index/Small help
    By WWSL14 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-12-2013, 03:50 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