A
Annika
Excel is silly:
If cell range A1:A10 is empty,
=average(a1:a10) will result in a #DIV/0! error message,
=max(a1:a10) will result in 0,
and
=min(a1:a10) will also result in 0.
I work with large intrinsic data sets, but sometimes have
to use these 3 functions on them in macros using VBA. I
need to avoid the #DIV/0! errors that occur in the
averaging column, and do this by using the formula
=IF(ISERROR(AVERAGE(a1:a10)), "", AVERAGE(a1:a10)). By
this I replace the error messages with blanks.
So here's my question:
When I'm using the MIN or MAX functions, is there a code
(excel worksheet formula or VBA) that can make the cell
show blank instead of a "0" if the range that I am using
is empty?
Please help!
If cell range A1:A10 is empty,
=average(a1:a10) will result in a #DIV/0! error message,
=max(a1:a10) will result in 0,
and
=min(a1:a10) will also result in 0.
I work with large intrinsic data sets, but sometimes have
to use these 3 functions on them in macros using VBA. I
need to avoid the #DIV/0! errors that occur in the
averaging column, and do this by using the formula
=IF(ISERROR(AVERAGE(a1:a10)), "", AVERAGE(a1:a10)). By
this I replace the error messages with blanks.
So here's my question:
When I'm using the MIN or MAX functions, is there a code
(excel worksheet formula or VBA) that can make the cell
show blank instead of a "0" if the range that I am using
is empty?
Please help!