View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
jmj713 jmj713 is offline
external usenet poster
 
Posts: 57
Default If 100.0% display 100%

Could you explain a bit, please? What possible errors could there be?

"Bernard Liengme" wrote:

Numbers in A1 and B1. my percentage is (B1-A1)/A1; Adjust to suit your needs

=IF(MOD((B1-A1)/A1*100,1)<0.00000001,TEXT((B1-A1)/A1,"#%"),TEXT((B1-A1)/A1,"#.#%"))

Note I do not check MOD for zero because of the possibility of round off
errors as with 2 and 4.56