Thread: Cell Programing
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default Cell Programing

Hi again John,

I forgot to divide by 5 in the second part but should not have returned a
formula error; just the wrong answer. Try the following. Works fine in xl2002
and xl2007.

=IF(MOD(SUM(A1:A2),5)0,"",SUM(A1:A2)/5)

If still returning an error, what version of xl are you using?

--
Regards,

OssieMac


"John Savy" wrote:

Thanks for reply,
I tried and didn't work. It gives formula error.
Again, I'm looking non-decimal figures.
For example, A1=4, A2= 6, so sum((A1+A2)/5) = 2; therefore the program
should show #2, if it was 2.45, I shouldn't show, since the result has
decimal points.
Thaks,

--
John


"OssieMac" wrote:

Hi John,

=IF(MOD(SUM(A1:A2),5)0,"",SUM(A1:A2))

The above places a null value (which is represented by the double quotes) if
division by 5 does not return a whole number; otherwise will sum the range.

--
Regards,

OssieMac


"John Savy" wrote:

Could you show me how to write this program:
if[sum((A1)+(A2))/5] would have decimal points then "blank", not to show
otherwise the result.
In other words I'm looking for the result without decimal point and if the
result has decimal point, it would be out of scop of the purpose, therefore
I'm not interested on the result.
Thanks,

--
John