How can I make Excel's MIN function ignore zeroes in a set?

回眸只為那壹抹淺笑 提交于 2019-12-12 11:16:18

问题


In Excel, I have the following formula =(MIN(H69,H52,H35,H18)*(1/H18))*10 that is supposed to return the MIN of a range, and divide it by the current cell (*(1/H18) ), then multiply by 10.

I am having difficulty with adding a type of NULLIF statement. I want to be able to have (the possibility for) blank rows, and have the MIN function ignore zero/blank fields while selecting the next lowest value (all are between 1.0-0.1).

Is there a modifier i can apply to the MIN function to make it not compare zeroes in the MIN set? Is there a better function than MIN to use?

Here is the arrangement:

  • Please remember to include the syntax for where the MIN's set goes
  • The reason for the H69,H52,H35,H18 using commas is that these are embedded, individual cells that are arranged for visual presentation as well. Using a range, or colon/semi-colon operators don't appear to work for this purpose (see pic).
  • This is to prevent the following situation: users will need to eliminate fields that are zeros from the form, theres 2 formula edits per entry, averaging 4 entries per use, so 8 possible errors per form use...

回答1:


You can use an array formula:

=MIN(IF(A1:A100>0,A1:A100))

You will need to hit ctrl+shift+enter to activate this formula.




回答2:


You could use

=SMALL(A1:A3,COUNTIF(A1:A3,0)+1)


来源:https://stackoverflow.com/questions/4628524/how-can-i-make-excels-min-function-ignore-zeroes-in-a-set

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!