+ Reply to Thread
Results 1 to 8 of 8

minimum sum value excluding value 0

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    minimum sum value excluding value 0

    Good evening,
    as the title suggests, I need to find in a sum,
    the minimum value other than 0.
    In the attached file in column M I report the minimum values of the sums of various columns.
    in cell M2 it gives me the minimum value which is 0
    but, excluding 0, it should be 45.58

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: minimum sum value excluding value 0

    Please try
    =AGGREGATE(15;6;1/(1/SUMIFS(F2:K2,F$1:K$1,{"A";"B";"C"}));1)

    or
    =AGGREGATE(15;6;1/(1/CHOOSE({1;2;3};F2+G2;H2+I2;J2+K2));1)
    Attached Files Attached Files

  3. #3
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: minimum sum value excluding value 0

    ummmm...your current formula is looking at the entire horizontal range in row 2. the val you want is in cell h6 and sums 2 vals that are unrelated to your current function. try this is cell m2 and see if it gives you a boost and/or insight into what you want:
    =SMALL(F2:K2,COUNTIF(F2:K2, 0)+1)
    taken from:

    https://support.microsoft.com/en-us/...1-f75bb9bb89bd

    https://www.google.com/search?q=exce...d+lowest+value

  4. #4
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Re: minimum sum value excluding value 0

    ok this is okay
    =AGGREGATE(15;6;1/(1/CHOOSE({1;2;3};F2+G2;H2+I2;J2+K2));1)

    one last thing
    wanting to color the two cells that correspond to the minimum
    how to set the formula in conditional formatting?

    Thanks

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: minimum sum value excluding value 0

    Please try CF formula applies to F6:K8

    =F6=$M2


    or CF formula applies to F2:K4

    =SUMIFS($F2:$K2,$F$1:$K$1,F$1)=$M2
    Attached Files Attached Files
    Last edited by Bo_Ry; 12-17-2020 at 04:13 PM.

  6. #6
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Re: minimum sum value excluding value 0

    Sorry, I'm the one who didn't explain myself well.
    I would like it on F2: K4
    the sum of 2 cells = M2

  7. #7
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Re: minimum sum value excluding value 0

    I did 3
    ...
    = $ H2 + $ I2 = $ M2
    It applies to:
    = $ H $ 2: $ I $ 4
    ...
    you can give it unique

  8. #8
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: minimum sum value excluding value 0

    Someone has to suggest brute force with array formulas.

    M2:
    Formula: copy to clipboard
    =MIN(IF(MMULT(F2:K2,{1,0,0;1,0,0;0,1,0;0,1,0;0,0,1;0,0,1}),MMULT(F2:K2,{1,0,0;1,0,0;0,1,0;0,1,0;0,0,1;0,0,1})))

    Fill M2 down as far as needed. Enter array formulas by holding down [Ctrl] and [Shift] keys before pressing [Enter].

    The array in the formula above could be generated by

    Formula: copy to clipboard
    =--(TRANSPOSE(INT((COLUMN(F2:K2)-MIN(COLUMN(F2:K2)))/2))={0,1,2})


    so that if you wanted sums of 3 columns it'd change to

    Formula: copy to clipboard
    =--(TRANSPOSE(INT((COLUMN(F2:K2)-MIN(COLUMN(F2:K2)))/3))={0,1})


    or if you wanted the sums of 5 columns from F2:Y2, it'd change to

    Formula: copy to clipboard
    =--(TRANSPOSE(INT((COLUMN(F2:Y2)-MIN(COLUMN(F2:Y2)))/5))={0,1,2,3})


    The number of adjacent columns to sum (n) become the divisor inside the INT call, and the ending array are sequential integers from 0 to the total number of columns divided by n less 1.
    Last edited by hrlngrv; 12-17-2020 at 04:49 PM. Reason: correction

+ 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. Return minimum value excluding zero - Non array help
    By MXSYYC in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-23-2019, 01:28 PM
  2. Finding Minimum Excluding the zero
    By thong127 in forum Excel General
    Replies: 18
    Last Post: 10-21-2016, 01:31 PM
  3. [SOLVED] Better way to find minimum value excluding zero and non number
    By a_driga in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-07-2014, 07:26 AM
  4. [SOLVED] Finding the minimum value in a range but excluding one value
    By Wilgoss in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-04-2012, 08:39 AM
  5. Averaging values, excluding minimum value
    By LoriR in forum Excel General
    Replies: 10
    Last Post: 04-22-2011, 03:45 AM
  6. Minimum value excluding zero?
    By Ritte in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 12-30-2009, 05:18 PM
  7. Find Minimum, excluding ties
    By Georgia Golfer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-06-2009, 12:41 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