Rounding Off

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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)
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top