Hi,
Having a difficult time finding the difference between the maximum number and the smallest non-zero value that ignores text and any error messages. What I need to do is subtract the Maximum value in the column from the smallest non zero value. In the case below, it should take 7 minus 5 and answer is 2.
<TABLE style="WIDTH: 48pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=80 border=0 x:str><COLGROUP><COL style="WIDTH: 48pt" width=80><TBODY><TR style="HEIGHT: 12.75pt" height=21><TD class=xl22 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #333399 1pt solid; BORDER-LEFT: #333399 1pt solid; WIDTH: 48pt; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: #ccffcc" width=80 height=21>Data</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21></TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21></TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:fmla="=5/0" x:err="#DIV/0!">#DIV/0!</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:err="#NAME?">#NAME?</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21></TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21></TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21>dog</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>5.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>5.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21></TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21></TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21></TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>5.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>6.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>7.0</TD></TR><TR style="HEIGHT: 13.5pt" height=23><TD class=xl24 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #333399 1pt solid; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent" height=23></TD></TR></TBODY></TABLE>
I have tried the following formula:
=IF(SUM(F6:F29) < 1,0,MAX(F6:F30)-SMALL(F6:F30,COUNTIF(F6:F30,0)+0)) resulting in #DIV/0!.
I even tried to isolate the COUNTIF portion by using:
=SUMPRODUCT((--(ISTEXT($F$6:$F$29))+(ISERROR($F$6:$F$29))+(ISBLANK($F$6:$F$29))))+COUNTIF(F6:F29,"<=0")
with some success. The SUMPRODUCT formula resulted in 19, which I think is correct, but when placed inside the SMALL function, it still shows up as #DIV/0!. Now I normally would not have these errors, but I am using them as surrogates for any error message type.
Can someone lead me in the right direction on how to find the MAX/MIN avoiding text, zeros and blanks.
Having a difficult time finding the difference between the maximum number and the smallest non-zero value that ignores text and any error messages. What I need to do is subtract the Maximum value in the column from the smallest non zero value. In the case below, it should take 7 minus 5 and answer is 2.
<TABLE style="WIDTH: 48pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=80 border=0 x:str><COLGROUP><COL style="WIDTH: 48pt" width=80><TBODY><TR style="HEIGHT: 12.75pt" height=21><TD class=xl22 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #333399 1pt solid; BORDER-LEFT: #333399 1pt solid; WIDTH: 48pt; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: #ccffcc" width=80 height=21>Data</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21></TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21></TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:fmla="=5/0" x:err="#DIV/0!">#DIV/0!</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:err="#NAME?">#NAME?</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21></TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21></TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21>dog</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>5.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>5.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21></TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21></TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21></TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>0.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>5.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>6.0</TD></TR><TR style="HEIGHT: 12.75pt" height=21><TD class=xl23 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=21 x:num>7.0</TD></TR><TR style="HEIGHT: 13.5pt" height=23><TD class=xl24 style="BORDER-RIGHT: #333399 1pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #333399 1pt solid; BORDER-BOTTOM: #333399 1pt solid; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent" height=23></TD></TR></TBODY></TABLE>
I have tried the following formula:
=IF(SUM(F6:F29) < 1,0,MAX(F6:F30)-SMALL(F6:F30,COUNTIF(F6:F30,0)+0)) resulting in #DIV/0!.
I even tried to isolate the COUNTIF portion by using:
=SUMPRODUCT((--(ISTEXT($F$6:$F$29))+(ISERROR($F$6:$F$29))+(ISBLANK($F$6:$F$29))))+COUNTIF(F6:F29,"<=0")
with some success. The SUMPRODUCT formula resulted in 19, which I think is correct, but when placed inside the SMALL function, it still shows up as #DIV/0!. Now I normally would not have these errors, but I am using them as surrogates for any error message type.
Can someone lead me in the right direction on how to find the MAX/MIN avoiding text, zeros and blanks.