ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula help (https://www.excelbanter.com/excel-worksheet-functions/81205-formula-help.html)

scott

Formula help
 
In my spreedsheet I have a column that represents one whole month numbered
from the 1st to the 31st. The information that is entered in these columns
are numbers. At the bottom of this column I have formulas that total the
columns, gets the largest number and the smallest number and the average. My
problem is that occasionaly 0 is entered or if there are 31 days the 31st has
a 0 entered. The information that is entered in these cells are coming from
another sheet in the workbook. So when it does happen that a 0 is entered my
formula for the min is looking for the smallest number < 0 so it does not
retun 0 if entered. Below is my formula. This may not be possible but what I
need is that if the number is zero is to have the zero return as the lowest
for the month but if there are only 30 days I do not want the zero from the
31st. If this helps the column next to it will always have a number in it
larger than 0 and is related to the column that may have a zero except if
there is only 30 days or less like in Feb. Hope this is clear.
{=MIN(IF(C8:c38<0,C8:C38))}


thanks scott

pdberger

Formula help
 
Scott --

Try this:

=IF(MIN(A1:A31)=0,SMALL(A1:A31,2),MIN(A1:A31))

Should do it. HTH.

"scott" wrote:

In my spreedsheet I have a column that represents one whole month numbered
from the 1st to the 31st. The information that is entered in these columns
are numbers. At the bottom of this column I have formulas that total the
columns, gets the largest number and the smallest number and the average. My
problem is that occasionaly 0 is entered or if there are 31 days the 31st has
a 0 entered. The information that is entered in these cells are coming from
another sheet in the workbook. So when it does happen that a 0 is entered my
formula for the min is looking for the smallest number < 0 so it does not
retun 0 if entered. Below is my formula. This may not be possible but what I
need is that if the number is zero is to have the zero return as the lowest
for the month but if there are only 30 days I do not want the zero from the
31st. If this helps the column next to it will always have a number in it
larger than 0 and is related to the column that may have a zero except if
there is only 30 days or less like in Feb. Hope this is clear.
{=MIN(IF(C8:c38<0,C8:C38))}


thanks scott



All times are GMT +1. The time now is 01:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com