Rounding Off

J

Joohn Calder

Hi

I have the following formula in my worksheet

=IF(AK6="","",(AK6+AM6)/2)

Even although I have formatted this column to zero decimal places the pivot
table I use reads it to one deciamal place.

Can anyone tell me how I could add the "ROUND" function to the above formula
so that when my pivot table reads it there is zero decimal places?

I use Excel 2000

Thanks
 
P

Peo Sjoblom

If you want to round to nearest integer

=ROUND(IF(AK6="","",(AK6+AM6)/2),-1)

if you want to remove the decimals

=INT(IF(AK6="","",(AK6+AM6)/2))


=TRUNC(IF(AK6="","",(AK6+AM6)/2))


INT and TRUNC works the same way for positive numbers but not for negative

--
Regards,

Peo Sjoblom

(No private emails please)
 
P

Peo Sjoblom

Ouch, put the round, int or trunc inside the if function or else you'll get
an error if AK6 is blank

--
Regards,

Peo Sjoblom

(No private emails please)
 
Top