Many thanks.
This could be a problem?
I have '97 and '2000 Excel users working with an addin
developed under Excel2000, and we need a solution
which will always give XL's Symmetric Arithmetic ROUND.
Can I achieve this, please?
Background:
Prior to this, the users' data has almost always had qty as an Integer
and always rate as a value with 2 decimal places.
This seems to be changing, such that qty is increasingly becoming a
non-Integer value, and since the results of each individual calculation
are Summed...............
The requirement is that each calculation is 'Rounded' at source,
rather than 'Round' the summed value, if that makes sense.
Regards and thanks.
"JE McGimpsey" wrote in message
...
Just a caveat: Round() is a VBA6 introduction, so won't work with XL97
or MacXL.
Also, remember that VBA's Round uses what MS calls "Banker's Rounding"
in which numbers ending with the digit 5 are rounded to the nearest
*even* number. This is different than XL's Symmetric Arithmetic ROUND
which always rounds away from zero:
Bankers: Round(4.495, 2) == 4.50
Round(4.485, 2) == 4.48
XL's: ROUND(4.495, 2) == 4.50
ROUND(4.485, 2) == 4.49
There are dozens of ways to round numbers. See
http://support.microsoft.com/default...b;en-us;196652
for a fair discussion with VBA algorithms...
In article ,
"Frank Kabel" wrote:
Hi Stuart
try
C.Offset(0, 3).Value = Round(qty * rate,2)
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.593 / Virus Database: 376 - Release Date: 20/02/2004