Thread: Rounding
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Rounding

=21/(INT(A1) * 6 + (A1 - INT(A1)) * 10)

produced .21 for me.

--
Regards,
Tom Ogilvy

"Paul W Smith" wrote in message
...
Resouce A
16.0 = 16 big units or 96 small units
16.4 = 16 big units and 4 small units, total 100 small units

I am trying to find some averages, and having troubles!.

If 21 wigets cost 16.4 (100 small units), simple math tells me that each
small unit = 0.21 wigets. However Excel, calculating with VBA I get
2.0999999905 - at least that is what I get when I apply result onto my
worksheet.

I am using:

widgets / (Int(Resouce A) * 6 + (Resouce A - Int(Resouce A)) * 10)